/* ===== Responsive Styles - Mobile and Tablet Breakpoints ===== */

/* Tablet Logo text */
@media (max-width: 1024px) {
    .logo-text {
        font-size: 24px;
    }
}

/* Mobile Logo text */
@media (max-width: 768px) {
    .logo-text {
        font-size: 22px;
        text-shadow: 1px 1px 0 #f5e6d3, -1px -1px 0 #f5e6d3,
            1px -1px 0 #f5e6d3, -1px 1px 0 #f5e6d3,
            2px 2px 0 rgba(0, 0, 0, 0.15);
    }
}

/* Small mobile Logo text */
@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }
}

/* Mobile sidebar overlay mode */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        box-shadow: 8px 0 0 rgba(92, 64, 51, 0.5);
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease;
    }

    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
        width: 280px;
    }

    .toggle-sidebar-button {
        z-index: 1001;
    }
}

/* Mobile book cover responsive */
@media (max-width: 768px) {
    .library-book-cover {
        padding: 6px;
    }

    .library-book-cover.size-small img {
        max-width: 60px;
    }

    .library-book-cover.size-medium img {
        max-width: 100px;
    }

    .library-book-cover.size-large img {
        max-width: 150px;
    }
}

/* Mobile: Hide thinking process */
@media (max-width: 768px) {
    .thinking-message {
        display: none !important;
    }

    /* Page overall optimization */
    body {
        font-size: 14px;
    }

    /* Header optimization - soft modern style */
    .header {
        padding: 1rem 1rem 1.25rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        border-bottom: none;
        box-shadow: none;
        background: linear-gradient(180deg,
                #faf8f4 0%,
                var(--parchment) 100%);
    }

    .header-left {
        flex: none;
    }

    .header-logo {
        height: 55px;
    }

    .header h1 {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.3rem;
    }

    .auth-section {
        display: none;
    }

    /* Mobile bottom auth area */
    .mobile-auth-section {
        display: flex !important;
        justify-content: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        padding-bottom: 2.5rem; /* Leave space for bottom disclaimer */
        background: linear-gradient(180deg,
                var(--parchment) 0%,
                var(--parchment-dark) 100%);
        border-top: 3px solid var(--brown-dark);
    }

    .login-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-width: 3px;
        box-shadow: 3px 3px 0 rgba(92, 64, 51, 0.4);
    }

    .user-info {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        border-width: 3px;
        box-shadow: 3px 3px 0 rgba(92, 64, 51, 0.4);
    }

    /* SSO options mobile style */
    .sso-option {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .sso-icon {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
        border-width: 2px;
    }

    /* Language options mobile style */
    .language-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-width: 3px;
        box-shadow: 3px 3px 0 rgba(92, 64, 51, 0.4);
    }

    .language-option {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .language-dropdown {
        border-width: 3px;
        box-shadow: 4px 4px 0 rgba(92, 64, 51, 0.4);
    }

    .dropdown-content {
        border-width: 3px;
        box-shadow: 4px 4px 0 rgba(92, 64, 51, 0.4);
    }

    /* Mobile bottom dropdown - pop up */
    .mobile-auth-section .language-dropdown,
    .mobile-auth-section .dropdown-content {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 0.5rem;
        box-shadow: 4px -4px 0 rgba(92, 64, 51, 0.4);
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        border-width: 2px;
    }

    /* Chat container optimization */
    .chat-container {
        margin: 0;
        padding-top: 0;
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
        border: none;
        box-shadow: none;
        clip-path: none;
        background: var(--parchment);
    }

    /* Fill portrait screen */
    .main-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        min-height: 100vh;
        background: var(--parchment);
    }

    /* Quick actions optimization */
    .quick-actions {
        padding: 0.75rem 1rem;
    }

    .quick-actions h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .preset-buttons {
        gap: 0.5rem;
        display: flex;
        flex-wrap: wrap;
    }

    .preset-button {
        flex: 0 1 calc(50% - 0.25rem);
        padding: 0.75rem 0.75rem;
        font-size: 0.9rem;
        text-align: center;
        min-width: 0;
        white-space: normal;
        overflow: visible;
        line-height: 1.4;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
    }

    /* Messages area optimization */
    .messages {
        padding: 1rem;
        gap: 0.75rem;
        min-height: 300px;
    }

    .message {
        max-width: 95%;
        padding: 0.75rem 1rem;
        border-radius: 0;
        font-size: 0.8rem;
        line-height: 1.5;
    }

    /* Input area optimization */
    .input-area {
        padding: 1rem;
        border-top: 4px solid var(--brown-dark);
        background: linear-gradient(180deg,
                var(--parchment) 0%,
                var(--parchment-dark) 100%);
        position: relative;
        overflow: visible;
    }

    .input-container {
        gap: 0.5rem;
        flex-direction: column;
    }

    /* Mobile: First row input box and recording button */
    .input-container {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.5rem;
    }

    /* Input container takes first column */
    .autocomplete-container {
        grid-column: 1;
        grid-row: 1;
    }

    /* Voice button container takes second column */
    .input-container>div:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: center;
    }

    /* Button group takes entire second row */
    .button-group {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
        position: relative;
        width: 100%;
    }

    .message-input {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        border-radius: 0;
        min-height: 45px;
        max-height: 100px;
    }

    .voice-button {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    /* Mobile character GIF - above input area border (outside area) */
    .input-character {
        width: 50px !important;
        position: absolute !important;
        bottom: calc(100% + 65px) !important;
        top: auto !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        z-index: 100;
    }

    /* Mobile character fade out animation adjustment */
    .input-character.fade-out {
        animation: characterFadeOutMobile 0.5s ease-out forwards !important;
    }

    @keyframes characterFadeOutMobile {
        0% {
            opacity: 1;
            transform: translateY(0);
        }

        100% {
            opacity: 0;
            transform: translateY(-20px);
        }
    }

    /* Mobile button group */
    .button-group {
        position: relative;
    }

    .send-button {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 0;
        max-width: none;
    }

    /* Tool call optimization */
    .tool-call {
        padding: 0.5rem;
        margin: 0.5rem 0;
        font-size: 0.7rem;
    }

    .tool-content {
        padding: 0.5rem;
        font-size: 0.7rem;
        line-height: 1.4;
    }

    /* Code block optimization */
    .markdown-content pre {
        font-size: 0.7rem;
        padding: 0.5rem;
        border-radius: 0;
        overflow-x: auto;
        white-space: pre;
    }

    .markdown-content code {
        font-size: 0.75rem;
        padding: 0.2rem 0.3rem;
    }

    /* Ensure touch friendly */
    button,
    .preset-button {
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Prevent zoom */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Bottom disclaimer mobile optimization */
    .bottom-disclaimer {
        padding: 0.4rem 0.75rem;
        font-size: 0.55rem;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

/* Extra small screen optimization (iPhone SE etc.) */
@media (max-width: 375px) {
    .chat-container {
        margin: 0.5rem auto;
        width: calc(100% - 1rem);
    }

    .header {
        padding: 0.75rem;
    }

    .header h1 {
        font-size: 0.75rem;
    }

    .preset-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .preset-button {
        flex: none;
        width: 100%;
        padding: 0.875rem 0.75rem;
        font-size: 0.9rem;
        white-space: normal;
        line-height: 1.4;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
    }

    .button-group {
        flex-direction: row;
        width: 100%;
    }

    .send-button {
        flex: none;
        width: 100%;
    }

    /* Extra small screen bottom disclaimer optimization */
    .bottom-disclaimer {
        padding: 0.3rem 0.5rem;
        font-size: 0.5rem;
    }
}

/* ===== Tour & Welcome Modal Responsive ===== */

/* Tour overlay style */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(92, 64, 51, 0.85);
    z-index: 9998;
    display: none;
    animation: fadeIn 0.3s ease-in;
    overflow: hidden;
}

.tour-overlay.active {
    display: block;
}

.tour-spotlight {
    position: fixed;
    border: 6px solid var(--orange);
    border-radius: 0;
    box-shadow: 0 0 0 9999px rgba(92, 64, 51, 0.85),
        0 0 0 10px rgba(255, 140, 66, 0.5);
    pointer-events: none;
    z-index: 9999;
    transition: all 0.3s ease;
    animation: spotlightPulse 1.5s infinite;
}

@keyframes spotlightPulse {
    0%,
    100% {
        box-shadow: 0 0 0 9999px rgba(92, 64, 51, 0.85),
            0 0 0 10px rgba(255, 140, 66, 0.5);
    }

    50% {
        box-shadow: 0 0 0 9999px rgba(92, 64, 51, 0.85),
            0 0 0 16px rgba(255, 140, 66, 0.8);
    }
}

.tour-tooltip {
    position: fixed;
    background: linear-gradient(180deg,
            var(--parchment) 0%,
            var(--parchment-dark) 100%);
    border: 6px solid var(--brown-dark);
    border-radius: 0;
    padding: 1.5rem;
    max-width: 400px;
    box-shadow: 10px 10px 0 rgba(92, 64, 51, 0.6);
    z-index: 10000;
    animation: messageSlideIn 0.3s ease-out;
}

.tour-tooltip-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tour-tooltip-icon {
    font-size: 2rem;
}

.tour-tooltip-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brown-dark);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.tour-tooltip-content {
    color: var(--brown-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.tour-progress {
    font-size: 0.7rem;
    color: var(--brown-light);
    font-weight: 700;
}

.tour-buttons {
    display: flex;
    gap: 0.5rem;
}

.tour-button {
    padding: 0.5rem 1rem;
    border: 4px solid var(--brown-dark);
    border-radius: 0;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.1s ease;
    box-shadow: 4px 4px 0 rgba(92, 64, 51, 0.5);
}

.tour-button-skip {
    background: linear-gradient(180deg,
            var(--parchment) 0%,
            var(--parchment-dark) 100%);
    color: var(--brown-dark);
}

.tour-button-skip:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(92, 64, 51, 0.5);
}

.tour-button-next {
    background: linear-gradient(180deg,
            var(--orange-light) 0%,
            var(--orange) 100%);
    color: white;
}

.tour-button-next:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(92, 64, 51, 0.5);
}

/* Welcome modal style */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(92, 64, 51, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease-in;
}

.welcome-content {
    background: linear-gradient(180deg,
            var(--parchment) 0%,
            var(--parchment-dark) 100%);
    border: 6px solid var(--brown-dark);
    border-radius: 0;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 10px 10px 0 rgba(92, 64, 51, 0.6);
    animation: messageSlideIn 0.4s ease-out;
    /* Pixel serrated border effect */
    clip-path: polygon(0 8px,
            8px 8px,
            8px 0,
            calc(100% - 8px) 0,
            calc(100% - 8px) 8px,
            100% 8px,
            100% calc(100% - 8px),
            calc(100% - 8px) calc(100% - 8px),
            calc(100% - 8px) 100%,
            8px 100%,
            8px calc(100% - 8px),
            0 calc(100% - 8px));
}

.welcome-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-icon {
    margin-bottom: 1rem;
}

.welcome-icon img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    image-rendering: pixelated;
}

.welcome-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
}

.welcome-subtitle {
    font-size: 0.8rem;
    color: var(--brown-light);
    font-weight: 600;
}

.welcome-body {
    color: var(--brown-dark);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.welcome-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(180deg,
            white 0%,
            var(--parchment) 100%);
    border: 3px solid var(--brown-dark);
    border-radius: 0;
    font-size: 0.75rem;
    color: var(--brown-dark);
    font-weight: 600;
    box-shadow: 4px 4px 0 rgba(92, 64, 51, 0.3);
}

.welcome-feature-icon {
    font-size: 1.5rem;
}

.welcome-buttons {
    display: flex;
    gap: 1rem;
}

.welcome-button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: 4px solid var(--brown-dark);
    border-radius: 0;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.1s ease;
    box-shadow: 6px 6px 0 rgba(92, 64, 51, 0.5);
}

.welcome-button-tour {
    background: linear-gradient(180deg,
            var(--orange-light) 0%,
            var(--orange) 100%);
    color: white;
}

.welcome-button-tour:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 rgba(92, 64, 51, 0.5);
}

.welcome-button-skip {
    background: linear-gradient(180deg,
            var(--parchment) 0%,
            var(--parchment-dark) 100%);
    color: var(--brown-dark);
}

.welcome-button-skip:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 rgba(92, 64, 51, 0.5);
}

/* Mobile tour optimization */
@media (max-width: 768px) {
    /* Tour tooltip optimization */
    .tour-tooltip {
        max-width: 90%;
        width: calc(100% - 2rem);
        padding: 1rem;
        left: 1rem !important;
        right: 1rem;
    }

    .tour-tooltip-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tour-tooltip-icon {
        font-size: 1.5rem;
    }

    .tour-tooltip-title {
        font-size: 0.8rem;
    }

    .tour-tooltip-content {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .tour-tooltip-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tour-buttons {
        width: 100%;
        flex-direction: column;
    }

    .tour-button {
        width: 100%;
        padding: 0.75rem;
    }

    /* Welcome modal optimization */
    .welcome-content {
        padding: 1.5rem;
        max-width: 95%;
        width: 95%;
    }

    .welcome-icon {
        margin-bottom: 0.75rem;
    }

    .welcome-icon img {
        width: 128px;
        height: 128px;
    }

    .welcome-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .welcome-subtitle {
        font-size: 0.75rem;
    }

    .welcome-body {
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .welcome-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .welcome-feature {
        padding: 0.6rem;
        font-size: 0.7rem;
    }

    .welcome-feature-icon {
        font-size: 1.3rem;
    }

    .welcome-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .welcome-button {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.7rem;
    }

    /* Spotlight effect smaller on mobile */
    .tour-spotlight {
        border-width: 4px;
    }

    /* Ensure overlay displays correctly on mobile */
    .tour-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }

    /* Mobile sidebar tour step special handling */
    .sidebar.tour-highlight {
        width: 280px !important;
    }
}

/* Extra small screen optimization (iPhone SE etc.) */
@media (max-width: 375px) {
    .tour-tooltip {
        padding: 0.875rem;
    }

    .tour-tooltip-title {
        font-size: 0.95rem;
    }

    .tour-tooltip-content {
        font-size: 0.85rem;
    }

    .welcome-content {
        padding: 1.25rem;
    }

    .welcome-icon img {
        width: 96px;
        height: 96px;
    }

    .welcome-title {
        font-size: 1.15rem;
    }

    .welcome-subtitle {
        font-size: 0.85rem;
    }

    .welcome-body {
        font-size: 0.85rem;
    }

    .welcome-feature {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .welcome-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ===== Language Selection Modal ===== */

.language-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(92, 64, 51, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease-in;
}

.language-selection-modal.hidden {
    display: none;
}

.language-selection-content {
    background: linear-gradient(180deg,
            var(--parchment) 0%,
            var(--parchment-dark) 100%);
    border: 6px solid var(--brown-dark);
    border-radius: 0;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 10px 10px 0 rgba(92, 64, 51, 0.6);
    animation: messageSlideIn 0.4s ease-out;
    text-align: center;
    /* Pixel serrated border effect */
    clip-path: polygon(0 8px,
            8px 8px,
            8px 0,
            calc(100% - 8px) 0,
            calc(100% - 8px) 8px,
            100% 8px,
            100% calc(100% - 8px),
            calc(100% - 8px) calc(100% - 8px),
            calc(100% - 8px) 100%,
            8px 100%,
            8px calc(100% - 8px),
            0 calc(100% - 8px));
}

.language-selection-header {
    margin-bottom: 2rem;
}

.language-selection-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.language-selection-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
}

.language-selection-subtitle {
    font-size: 0.8rem;
    color: var(--brown-light);
    font-weight: 500;
}

.language-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.language-option-card {
    background: linear-gradient(180deg,
            white 0%,
            var(--parchment) 100%);
    border: 4px solid var(--brown-dark);
    border-radius: 0;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 6px 6px 0 rgba(92, 64, 51, 0.5);
}

.language-option-card:hover {
    background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 rgba(92, 64, 51, 0.5);
}

.language-option-card.selected {
    background: linear-gradient(180deg,
            var(--orange-light) 0%,
            var(--orange) 100%);
    border-color: var(--brown-dark);
    color: white;
    transform: translate(6px, 6px);
    box-shadow: none;
}

.language-flag {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.language-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.language-native-name {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

.language-confirm-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(180deg,
            var(--orange-light) 0%,
            var(--orange) 100%);
    color: white;
    border: 4px solid var(--brown-dark);
    border-radius: 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.1s ease;
    opacity: 0.5;
    pointer-events: none;
    box-shadow: 6px 6px 0 rgba(92, 64, 51, 0.5);
    text-transform: uppercase;
}

.language-confirm-button.enabled {
    opacity: 1;
    pointer-events: auto;
}

.language-confirm-button.enabled:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 rgba(92, 64, 51, 0.5);
}

/* Mobile language selection optimization */
@media (max-width: 768px) {
    .language-selection-content {
        padding: 2rem 1.5rem;
        width: 95%;
        max-height: 85vh;
    }

    .language-selection-icon {
        font-size: 3rem;
    }

    .language-selection-title {
        font-size: 1rem;
    }

    .language-selection-subtitle {
        font-size: 0.75rem;
    }

    .language-options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .language-option-card {
        padding: 1rem 0.75rem;
    }

    .language-flag {
        font-size: 2rem;
    }

    .language-name {
        font-size: 0.8rem;
    }

    .language-native-name {
        font-size: 0.65rem;
    }

    .language-confirm-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 375px) {
    .language-selection-content {
        padding: 1.5rem 1rem;
        max-height: 80vh;
    }

    .language-selection-icon {
        font-size: 2.5rem;
    }

    .language-selection-title {
        font-size: 0.9rem;
    }

    .language-options-grid {
        grid-template-columns: 1fr;
    }
}
