/* Mobile Menu Responsiveness - Higher Priority CSS */

/* Standard mobile devices (768px and below) */
@media (max-width: 768px) {
    .menu-buttons {
        justify-content: center;
        align-items: center;
    }
    .menu-content {
        padding: 20px !important;
        min-width: 70vw !important;
        max-width: 80vw !important;
    }
    
    .game-title {
        font-size: 2.5rem !important;
        letter-spacing: 2px !important;
    }
    
    .game-subtitle {
        font-size: 1rem !important;
        letter-spacing: 1px !important;
    }
    
    .menu-btn {
        padding: 12px 20px !important;
        font-size: 1rem !important;
        width: 100% !important;
    }
    
    /* Pause Menu and Game Over Menu Buttons */
    #newPauseMenu .menu-btn {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        max-width: 75% !important;
        margin: 0 auto !important;
    }
    
    /* Old Pause Menu Buttons */
    #pauseMenu button {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        max-width: 75% !important;
        margin: 5px auto !important;
    }
    
    /* Guest Profile Widget - Mobile Responsive */
    .guest-profile-widget {
        top: 15px !important;
        right: 15px !important;
        gap: 8px !important;
    }
    
    .guest-avatar {
        width: 35px !important;
        height: 35px !important;
    }
    
    .guest-avatar-fallback {
        font-size: 16px !important;
    }
    
    .guest-info {
        padding: 6px 8px !important;
    }
    
    .guest-username {
        font-size: 14px !important;
        margin-bottom: 3px !important;
        max-width: 120px !important;
    }
    
    .guest-stats {
        gap: 15px !important;
    }
    
    .stat-item .stat-label {
        font-size: 10px !important;
    }
    
    .stat-item .stat-value {
        font-size: 12px !important;
    }
    
    .save-progress-btn {
        padding: 8px 12px !important;
        border-radius: 10px !important;
        min-width: auto !important;
        width: auto !important;
        height: 32px !important;
    }
    
    /* Replace "Save Progress" with "Save" on mobile */
    .save-progress-btn {
        font-size: 0 !important;
        text-indent: -9999px !important;
        overflow: visible !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
    }
    
    .save-progress-btn::after {
        content: 'Save' !important;
        font-size: 11px !important;
        color: white !important;
        font-weight: 600 !important;
        text-indent: 0 !important;
        position: static !important;
    }
    
    .save-progress-btn svg {
        width: 14px !important;
        height: 14px !important;
        margin: 0 !important;
        display: block !important;
        position: static !important;
        transform: none !important;
        font-size: 14px !important;
    }
    
    /* User Profile Widget - Mobile Responsive */
    .user-profile-widget {
        top: 15px !important;
        right: 15px !important;
        gap: 8px !important;
    }
    
    .profile-avatar {
        width: 35px !important;
        height: 35px !important;
    }
    
    .avatar-fallback {
        font-size: 16px !important;
    }
    
    .profile-info {
        padding: 6px 8px !important;
    }
    
    .profile-username {
        font-size: 14px !important;
        margin-bottom: 3px !important;
        max-width: 120px !important;
    }
    
    .profile-stats {
        gap: 15px !important;
    }
    
    .profile-stats .stat-item .stat-label {
        font-size: 10px !important;
    }
    
    .profile-stats .stat-item .stat-value {
        font-size: 12px !important;
    }
    
    .profile-logout-btn {
        padding: 8px !important;
        border-radius: 10px !important;
        min-width: 32px !important;
        width: 32px !important;
        height: 32px !important;
    }
    
    .profile-logout-btn svg {
        width: 14px !important;
        height: 14px !important;
        margin: 0 !important;
    }
}

/* Small mobile devices (480px and below) */
@media (max-width: 480px) {
    .menu-content {
        padding: 15px !important;
        min-width: 85vw !important;
        max-width: 85vw !important;
    }
    
    .logo-section {
        margin-bottom: 30px !important;
    }
    
    .game-title {
        font-size: 2rem !important;
        letter-spacing: 1px !important;
    }
    
    .game-subtitle {
        font-size: 0.9rem !important;
        margin: 8px 0 20px 0 !important;
    }
    
    .ether-crystal {
        font-size: 2rem !important;
    }
    
    .menu-buttons {
        gap: 15px !important;
        margin: 30px 0 !important;
    }
    
    .menu-btn {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Pause Menu and Game Over Menu Buttons */
    #newPauseMenu .menu-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
        max-width: 70% !important;
        margin: 0 auto !important;
    }
    
    /* Old Pause Menu Buttons */
    #pauseMenu button {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
        max-width: 70% !important;
        margin: 5px auto !important;
    }
    
    /* Guest Profile Widget - Smaller Mobile */
    .guest-profile-widget {
        top: 12px !important;
        right: 12px !important;
        gap: 6px !important;
    }
    
    .guest-avatar {
        width: 30px !important;
        height: 30px !important;
    }
    
    .guest-avatar-fallback {
        font-size: 14px !important;
    }
    
    .guest-info {
        padding: 5px 6px !important;
    }
    
    .guest-username {
        font-size: 12px !important;
        margin-bottom: 2px !important;
        max-width: 100px !important;
    }
    
    .guest-stats {
        gap: 12px !important;
    }
    
    .stat-item .stat-label {
        font-size: 9px !important;
    }
    
    .stat-item .stat-value {
        font-size: 11px !important;
    }
    
    .save-progress-btn {
        padding: 6px 10px !important;
        width: auto !important;
        height: 28px !important;
        min-width: auto !important;
        font-size: 0 !important;
        text-indent: -9999px !important;
        overflow: visible !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
    }
    
    .save-progress-btn::after {
        content: 'Save' !important;
        font-size: 10px !important;
        color: white !important;
        font-weight: 600 !important;
        text-indent: 0 !important;
        position: static !important;
    }
    
    .save-progress-btn svg {
        width: 12px !important;
        height: 12px !important;
        position: static !important;
        transform: none !important;
        font-size: 12px !important;
    }
    
    /* User Profile Widget - Smaller Mobile */
    .user-profile-widget {
        top: 12px !important;
        right: 12px !important;
        gap: 6px !important;
    }
    
    .profile-avatar {
        width: 30px !important;
        height: 30px !important;
    }
    
    .avatar-fallback {
        font-size: 14px !important;
    }
    
    .profile-info {
        padding: 5px 6px !important;
    }
    
    .profile-username {
        font-size: 12px !important;
        margin-bottom: 2px !important;
        max-width: 100px !important;
    }
    
    .profile-stats {
        gap: 12px !important;
    }
    
    .profile-stats .stat-item .stat-label {
        font-size: 9px !important;
    }
    
    .profile-stats .stat-item .stat-value {
        font-size: 11px !important;
    }
    
    .profile-logout-btn {
        padding: 6px !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
    }
    
    .profile-logout-btn svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* Small mobile devices (under 400px) */
@media (max-width: 400px) {
    .menu-content {
        padding: 10px !important;
        min-width: 85vw !important;
        max-width: 85vw !important;
    }
    
    .logo-section {
        margin-bottom: 25px !important;
    }
    
    .game-title {
        font-size: 1.6rem !important;
        letter-spacing: 0.5px !important;
    }
    
    .game-subtitle {
        font-size: 0.8rem !important;
        margin: 6px 0 15px 0 !important;
        letter-spacing: 1px !important;
    }
    
    .ether-crystal {
        font-size: 1.5rem !important;
    }
    
    .menu-buttons {
        gap: 10px !important;
        margin: 25px 0 !important;
    }
    
    .menu-btn {
        padding: 12px 12px !important;
        font-size: 0.75rem !important;
        letter-spacing: 0.3px !important;
        border-radius: 10px !important;
    }
    
    /* Pause Menu and Game Over Menu Buttons */
    #newPauseMenu .menu-btn {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
        max-width: 65% !important;
        margin: 0 auto !important;
    }
    
    /* Old Pause Menu Buttons */
    #pauseMenu button {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
        max-width: 65% !important;
        margin: 3px auto !important;
    }
    
    /* Guest Profile Widget - Very Small Mobile */
    .guest-profile-widget {
        top: 10px !important;
        right: 10px !important;
        gap: 4px !important;
    }
    
    .guest-avatar {
        width: 26px !important;
        height: 26px !important;
    }
    
    .guest-avatar-fallback {
        font-size: 12px !important;
    }
    
    .guest-info {
        padding: 4px 5px !important;
    }
    
    .guest-username {
        font-size: 11px !important;
        margin-bottom: 1px !important;
        max-width: 80px !important;
    }
    
    .guest-stats {
        gap: 10px !important;
    }
    
    .stat-item .stat-label {
        font-size: 8px !important;
    }
    
    .stat-item .stat-value {
        font-size: 10px !important;
    }
    
    .save-progress-btn {
        padding: 5px 8px !important;
        width: auto !important;
        height: 24px !important;
        min-width: auto !important;
        font-size: 0 !important;
        text-indent: -9999px !important;
        overflow: visible !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
    }
    
    .save-progress-btn::after {
        content: 'Save' !important;
        font-size: 9px !important;
        color: white !important;
        font-weight: 600 !important;
        text-indent: 0 !important;
        position: static !important;
    }
    
    .save-progress-btn svg {
        width: 10px !important;
        height: 10px !important;
        position: static !important;
        transform: none !important;
        font-size: 10px !important;
    }
    
    /* User Profile Widget - Very Small Mobile */
    .user-profile-widget {
        top: 10px !important;
        right: 10px !important;
        gap: 4px !important;
    }
    
    .profile-avatar {
        width: 26px !important;
        height: 26px !important;
    }
    
    .avatar-fallback {
        font-size: 12px !important;
    }
    
    .profile-info {
        padding: 4px 5px !important;
    }
    
    .profile-username {
        font-size: 11px !important;
        margin-bottom: 1px !important;
        max-width: 80px !important;
    }
    
    .profile-stats {
        gap: 10px !important;
    }
    
    .profile-stats .stat-item .stat-label {
        font-size: 8px !important;
    }
    
    .profile-stats .stat-item .stat-value {
        font-size: 10px !important;
    }
    
    .profile-logout-btn {
        padding: 5px !important;
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
    }
    
    .profile-logout-btn svg {
        width: 10px !important;
        height: 10px !important;
    }
}

/* Very small mobile devices (320px and below) */
@media (max-width: 320px) {
    .menu-content {
        padding: 8px !important;
        min-width: 99vw !important;
        max-width: 99vw !important;
    }
    
    .logo-section {
        margin-bottom: 20px !important;
    }
    
    .game-title {
        font-size: 1.4rem !important;
        letter-spacing: 0.5px !important;
    }
    
    .game-subtitle {
        font-size: 0.7rem !important;
        margin: 5px 0 12px 0 !important;
    }
    
    .ether-crystal {
        font-size: 1.2rem !important;
    }
    
    .menu-buttons {
        gap: 8px !important;
        margin: 20px 0 !important;
    }
    
    .menu-btn {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
        border-radius: 8px !important;
        letter-spacing: 0.2px !important;
    }
    
    /* Pause Menu and Game Over Menu Buttons */
    #newPauseMenu .menu-btn {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
        max-width: 60% !important;
        margin: 0 auto !important;
    }
    
    /* Old Pause Menu Buttons */
    #pauseMenu button {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
        max-width: 60% !important;
        margin: 2px auto !important;
    }
    
    /* Guest Profile Widget - Tiny Mobile */
    .guest-profile-widget {
        top: 8px !important;
        right: 8px !important;
        gap: 3px !important;
    }
    
    .guest-avatar {
        width: 22px !important;
        height: 22px !important;
    }
    
    .guest-avatar-fallback {
        font-size: 10px !important;
    }
    
    .guest-info {
        padding: 3px 4px !important;
    }
    
    .guest-username {
        font-size: 10px !important;
        margin-bottom: 1px !important;
        max-width: 60px !important;
    }
    
    .guest-stats {
        gap: 8px !important;
    }
    
    .stat-item .stat-label {
        font-size: 7px !important;
    }
    
    .stat-item .stat-value {
        font-size: 9px !important;
    }
    
    .save-progress-btn {
        padding: 4px 6px !important;
        width: auto !important;
        height: 20px !important;
        min-width: auto !important;
        font-size: 0 !important;
        text-indent: -9999px !important;
        overflow: visible !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
    }
    
    .save-progress-btn::after {
        content: 'Save' !important;
        font-size: 8px !important;
        color: white !important;
        font-weight: 600 !important;
        text-indent: 0 !important;
        position: static !important;
    }
    
    .save-progress-btn svg {
        width: 8px !important;
        height: 8px !important;
        position: static !important;
        transform: none !important;
        font-size: 8px !important;
    }
    
    /* User Profile Widget - Tiny Mobile */
    .user-profile-widget {
        top: 8px !important;
        right: 8px !important;
        gap: 3px !important;
    }
    
    .profile-avatar {
        width: 22px !important;
        height: 22px !important;
    }
    
    .avatar-fallback {
        font-size: 10px !important;
    }
    
    .profile-info {
        padding: 3px 4px !important;
    }
    
    .profile-username {
        font-size: 10px !important;
        margin-bottom: 1px !important;
        max-width: 60px !important;
    }
    
    .profile-stats {
        gap: 8px !important;
    }
    
    .profile-stats .stat-item .stat-label {
        font-size: 7px !important;
    }
    
    .profile-stats .stat-item .stat-value {
        font-size: 9px !important;
    }
    
    .profile-logout-btn {
        padding: 4px !important;
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
    }
    
    .profile-logout-btn svg {
        width: 8px !important;
        height: 8px !important;
    }
}