/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 40px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 8px;
}

header .subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.95;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
}

/* Card Styles */
.explanation-card,
.form-card {
    background: white;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.explanation-card:hover,
.form-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.explanation-card h2,
.form-card h2 {
    color: #2196F3;
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.explanation-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    background: transparent;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-bottom-color: #2196F3;
}

.form-group input::placeholder {
    color: #999;
}

.error-message {
    display: block;
    color: #f44336;
    font-size: 0.875rem;
    margin-top: 4px;
    min-height: 20px;
}

/* Button Styles */
.submit-button {
    width: 100%;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-button:hover:not(:disabled) {
    background: #1976D2;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.submit-button:active:not(:disabled) {
    background: #1565C0;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.submit-button:disabled {
    background: #bbdefb;
    cursor: not-allowed;
    box-shadow: none;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Message Styles */
.message {
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.hidden {
    display: none;
}

/* Footer Styles */
footer {
    background: #263238;
    color: #b0bec5;
    padding: 24px 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    font-size: 0.9rem;
}

footer .buy-coffee img {
    height: 2rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .explanation-card,
    .form-card {
        padding: 24px;
    }

    .explanation-card h2,
    .form-card h2 {
        font-size: 1.5rem;
    }
}
