* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
}

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.hero-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0));
    z-index: 100;
}

.nav-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Contact Page */
.contact-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.contact-form {
    background: #1a1a2e;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group .required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: #12121f;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6a6aaa;
    box-shadow: 0 0 0 3px rgba(106, 106, 170, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1.2rem;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: #1a6b3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(26, 107, 60, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: #228b4a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 107, 60, 0.5);
}

.submit-btn:active {
    transform: translateY(0);
}

.contact-container .back-link {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-container .back-link:hover {
    color: #fff;
}

/* Quiz Page Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.quiz-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.question {
    background: #1a1a2e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.question h3 {
    margin-bottom: 1rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}


/* Progress Bar */
.progress {
    margin-bottom: 1.5rem;
}

#progress-text {
    display: block;
    margin-bottom: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.progress-bar {
    height: 6px;
    background: #252540;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4a4a8a;
    transition: width 0.3s ease;
}

/* Option States */
.option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #252540;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}

.option:hover {
    background: #303050;
}

.option.selected {
    border-color: #4a4a8a;
    background: #303050;
}

.option.correct {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.2);
}

.option.incorrect {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

.option input[type="radio"] {
    width: 18px;
    height: 18px;
}

/* Feedback */
.feedback {
    text-align: center;
    padding: 1rem;
    font-size: 3rem;
    font-weight: 700;
    min-height: 4rem;
}

.feedback.correct {
    color: #2ecc71;
}

.feedback.incorrect {
    color: #e74c3c;
}

.feedback.warning {
    color: #f1c40f;
    font-size: 1.2rem;
}

/* Action Button */
#action-btn {
    display: block;
    width: 55%;
    max-width: 350px;
    margin: 2rem auto;
    padding: 1.5rem 2.5rem;
    font-size: 2rem;
    font-weight: 700;
    background: #1a6b3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(26, 107, 60, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#action-btn:hover {
    transform: translateY(-3px);
    background: #145530;
    box-shadow: 0 10px 30px rgba(26, 107, 60, 0.7);
}

#action-btn:active {
    transform: translateY(0);
}

/* Results */
#result {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: #1a1a2e;
    border-radius: 8px;
    display: none;
}

#result h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

#result p {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #ccc;
}

.result.perfect h2 {
    color: #f1c40f;
}

.result.good h2 {
    color: #2ecc71;
}

.result.poor h2 {
    color: #e74c3c;
}

.restart-btn {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    background: #4a4a8a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.restart-btn:hover {
    background: #5a5a9a;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #888;
    text-decoration: none;
}

.back-link:hover {
    color: #fff;
}

/* Ollama AI Page */
.ollama-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: 100vh;
}

.ollama-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.ollama-form {
    background: #1a1a2e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ollama-form .form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.85rem;
    color: #666;
}

.ollama-form input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background: #12121f;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    margin-top: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ollama-form input:focus {
    outline: none;
    border-color: #6a6aaa;
    box-shadow: 0 0 0 3px rgba(106, 106, 170, 0.2);
}

.ollama-form input::placeholder {
    color: #666;
}

.ollama-form .submit-btn {
    margin-top: 1.5rem;
}

.ollama-form .submit-btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.response-area {
    margin-top: 2rem;
    background: #1a1a2e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.response-area h2 {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 1rem;
    font-weight: 500;
}

.response-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #fff;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 2rem;
    color: #888;
    font-size: 1.1rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #333;
    border-top-color: #6a6aaa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.error {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid #e74c3c;
    border-radius: 8px;
    color: #e74c3c;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Navigation */
    .top-nav {
        padding: 1rem;
        gap: 0.75rem;
    }

    .nav-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    /* Landing Page */
    .landing {
        padding: 1rem;
        padding-top: 5rem;
    }

    .hero-image {
        max-height: 60vh;
        border-radius: 6px;
    }

    /* Contact Page */
    .contact-container {
        padding: 1.5rem 1rem;
        padding-top: 5rem;
        justify-content: flex-start;
    }

    .contact-container h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.85rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .submit-btn {
        padding: 1rem;
        font-size: 1rem;
    }

    /* Quiz Page */
    .quiz-container {
        padding: 1rem;
        padding-top: 5rem;
    }

    .quiz-container h1 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .question {
        padding: 1rem;
    }

    .question h3 {
        font-size: 1rem;
        line-height: 1.4;
    }

    .option {
        padding: 0.65rem;
        font-size: 0.95rem;
    }

    .feedback {
        font-size: 2rem;
        min-height: 3rem;
    }

    #action-btn {
        width: 80%;
        padding: 1.2rem 1.5rem;
        font-size: 1.4rem;
        margin: 1.5rem auto;
    }

    #result {
        padding: 1.5rem;
    }

    #result h2 {
        font-size: 1.5rem;
    }

    #result p {
        font-size: 1rem;
    }

    /* Ollama AI Page */
    .ollama-container {
        padding: 1.5rem 1rem;
        padding-top: 5rem;
    }

    .ollama-container h1 {
        font-size: 2rem;
    }

    .ollama-form {
        padding: 1.5rem;
    }

    .ollama-form input {
        font-size: 16px;
    }

    .response-area {
        padding: 1.5rem;
    }

    .response-text {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .top-nav {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .quiz-container h1 {
        font-size: 1.5rem;
    }

    #action-btn {
        width: 90%;
        font-size: 1.2rem;
        padding: 1rem;
    }
}
