/* Response for Mobile - Consolidating all mobile overrides here */

@media (max-width: 768px) {

    /* Header */
    .site-header {
        padding: 0.8rem 1rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: transparent;
        z-index: 100;
        box-shadow: none;
    }

    .logo-text {
        display: inline;
        font-size: 1rem;
    }

    /* Home: Notification at top */
    .home-notification {
        position: static;
        font-size: 0.75rem;
        text-align: center;
        margin-bottom: 1rem;
        padding: 0.4rem 0.8rem;
        background: rgba(0, 0, 0, 0.03);
        border-radius: 20px;
    }

    /* Home: Hero Section */
    .home-hero-section {
        min-height: 90dvh;
        padding: 6rem 1rem 2rem 1rem;
        gap: 1.5rem;
        display: flex;
        flex-direction: column;
    }

    .action-area {
        margin-top: auto;
        width: 100%;
        display: flex;
        justify-content: center;
        padding-bottom: 3rem;
    }

    /* Home: Title slightly smaller */
    .main-title {
        font-size: 1.4rem;
        line-height: 1.3;
        text-align: center;
    }



    /* Home: Input box wider */
    .chat-input-wrapper-large {
        width: 100%;
        max-width: 100%;
        padding: 1.2rem 1rem;
        gap: 1rem;
    }

    .chat-input-large {
        font-size: 0.95rem;
    }

    /* Home: Container */
    .home-container {
        padding: 0 1rem 4rem 1rem;
    }

    /* Rules: Remove extra padding to widen cards */
    .rules-section {
        padding-left: 0;
        padding-right: 0;
        margin-top: 2rem;
        width: 100%;
    }

    .rules-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }

    .rule-card {
        height: auto;
        min-height: auto;
        padding: 1.2rem;
    }

    .card-desc {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 0.5rem;
    }

    /* --- Quiz Screen (Yes/No) Mobile --- */
    #screen-quiz {
        padding-top: 80px;
        display: block;
        height: 100dvh;
        overflow-y: hidden;
        /* Prevent double scroll if content fits */
    }

    .quiz-screen-layout {
        padding: 0 1rem;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        height: 100%;
        /* Fill the screen-quiz container */
        justify-content: flex-start;
        /* Header at top */
    }

    /* Wrapper for Question + Buttons */
    .quiz-content-layout {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center Vertically */
        align-items: center;
        width: 100%;
        gap: 0;
        /* Let children handle margins */
    }

    .quiz-header-bar {
        width: 100%;
        gap: 0.8rem;
        margin-bottom: 2rem;
        flex-shrink: 0;
        /* Keep header at top naturally */
    }

    .btn-back-arrow {
        width: 40px;
        height: 40px;
    }

    .quiz-question-text {
        font-size: 1.4rem;
        margin-bottom: 3rem;
        padding: 0 0.5rem;
        text-align: center;
        /* Explicitly center text */
        width: 100%;
    }

    .quiz-options-binary {
        gap: 1.5rem;
        justify-content: center;
        /* Center buttons */
    }

    .btn-binary {
        width: 130px;
        /* Revert mobile size */
        height: 130px;
        font-size: 4rem;
        border-radius: 20px;
        /* Revert radius */
        border: 2px solid #E2E8F0;
        /* Revert border */
        box-shadow: none;
    }

    /* --- Feedback Screen Mobile --- */
    #screen-feedback {
        padding-top: 60px;
        display: block;
        height: 100dvh;
        overflow-y: auto;
    }

    .feedback-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem 4rem 1rem;
        grid-template-columns: 1fr;
        /* Reset grid */
    }

    .feedback-left {
        text-align: left;
        align-items: flex-start;
        gap: 1rem;
    }

    .feedback-result-header {
        /* Keep horizontal row for Icon and Title */
        align-items: center;
        width: 100%;
    }

    .feedback-main-text {
        font-size: 1.6rem;
    }

    .feedback-sub-text {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .feedback-icon-large {
        font-size: 3.5rem;
    }

    .feedback-lottie {
        margin: 1rem auto 0 auto;
        width: 180px;
        height: 180px;
    }

    .feedback-right-card {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .fine-amount {
        font-size: 2rem;
    }

    /* --- Result Screen Mobile --- */
    #screen-result {
        padding-top: 50px;
        /* Reduced top pad */
        overflow-y: auto;
    }

    .result-container {
        padding: 0 1rem 3rem 1rem;
        /* Adjust padding */
    }

    .result-header-title {
        position: static;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.6rem;
        /* Slightly smaller */
    }

    .result-grid-inner {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 0;
    }

    .result-lottie-trophy {
        width: 180px;
        height: 180px;
    }

    .score-stars-box {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
        text-align: left;
        padding: 0 0 1rem 0;
    }

    .stars-display {
        font-size: 1.8rem;
    }

    .score-number {
        font-size: 1.6rem;
    }

    /* Chat Minimal Mobile Overrides */
    .chat-minimal-header {
        padding: 1rem 1rem;
    }

    .chat-history-minimal {
        padding: 5rem 1rem 11rem 1rem;
    }

    .chat-input-container-minimal {
        padding: 1rem 1rem 2rem 1rem;
    }

    /* Reference Modal - Mobile Sheet Style */
    #reference-modal .modal-content-card {
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        margin: 0;
        position: absolute;
        bottom: 0;
        left: 0;
        max-height: 85dvh;
        height: auto;
        animation: slide-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    #reference-modal .modal-card-body {
        padding-bottom: 3rem;
    }

    @keyframes slide-up {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}