/* Custom Styles for Play Life */

/* Badge Notification Styles */
.badge-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3e 100%);
    border: 2px solid #40e0d0;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(64, 224, 208, 0.3);
    transform: translateX(450px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.badge-notification.show {
    transform: translateX(0);
}

.badge-notification-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge-icon-large {
    font-size: 48px;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.badge-notification-title {
    font-size: 14px;
    color: #40e0d0;
    font-weight: 600;
    margin-bottom: 4px;
}

.badge-notification-name {
    font-size: 18px;
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 2px;
}

.badge-notification-desc {
    font-size: 12px;
    color: #a0a0a0;
}

/* Bucket List Styles */
.quest-card[data-type="bucketlist"] {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(30, 30, 40, 0.5) 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.quest-card[data-type="bucketlist"]::before {
    content: '✨';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 24px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Custom Styles for Play Life */

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 27, 0.8);
    border-radius: 10px;
    margin: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(78, 205, 196, 0.2) 0%,
        rgba(78, 205, 196, 0.25) 50%,
        rgba(147, 51, 234, 0.2) 100%
    );
    border-radius: 10px;
    border: 1px solid rgba(78, 205, 196, 0.1);
    box-shadow: inset 0 0 3px rgba(78, 205, 196, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(78, 205, 196, 0.3) 0%,
        rgba(78, 205, 196, 0.35) 50%,
        rgba(147, 51, 234, 0.3) 100%
    );
    border: 1px solid rgba(78, 205, 196, 0.2);
    box-shadow: inset 0 0 5px rgba(78, 205, 196, 0.2);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(
        180deg,
        rgba(78, 205, 196, 0.4) 0%,
        rgba(78, 205, 196, 0.45) 50%,
        rgba(147, 51, 234, 0.4) 100%
    );
    border: 1px solid rgba(78, 205, 196, 0.3);
}

::-webkit-scrollbar-corner {
    background: rgba(26, 26, 27, 0.8);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(78, 205, 196, 0.25) rgba(26, 26, 27, 0.8);
}

/* Scrollable containers specific styling */
.overflow-y-auto::-webkit-scrollbar-track,
.overflow-y-scroll::-webkit-scrollbar-track,
.overflow-x-auto::-webkit-scrollbar-track {
    background: rgba(30, 30, 40, 0.5);
    backdrop-filter: blur(10px);
}

.overflow-y-auto::-webkit-scrollbar-thumb,
.overflow-y-scroll::-webkit-scrollbar-thumb,
.overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.15);
    border: none;
}

/* Hide scrollbar for certain elements but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

/* Base Styles */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 217, 61, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
}

/* Navigation Styles */
.nav-item {
    color: rgba(255, 255, 255, 0.4);
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.7);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transform: scale(1.05);
}

.nav-item.active i {
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
    color: #ffffff;
}

.nav-item.active span {
    font-weight: 600;
    color: #ffffff;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    border-radius: 2px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
    box-shadow: 0 0 10px #4ecdc4;
}

/* Avatar Styles */
.avatar-container {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.avatar-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

.avatar-symbol {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1f3a 0%, #2a3f5f 100%);
    border: 2px solid rgba(78, 205, 196, 0.5);
    border-radius: 50%;
    font-size: 3rem;
    position: relative;
    z-index: 1;
}

/* Progress Bar Styles */
.exp-progress-container {
    position: relative;
    width: 100%;
    height: 24px;
    background: rgba(42, 63, 95, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

/* Compact EXP Bar for Quest Screen */
.quest-exp-container .exp-progress-container {
    height: 12px;
    border-radius: 6px;
}

.quest-exp-container .exp-progress-bar {
    border-radius: 6px;
}

.exp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #44a39f 100%);
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.exp-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Quest Card Styles */
.quest-card {
    background: linear-gradient(135deg, rgba(42, 63, 95, 0.5) 0%, rgba(26, 31, 58, 0.5) 100%);
    border: 1px solid rgba(78, 205, 196, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.quest-card:hover {
    transform: translateY(-2px);
    border-color: rgba(78, 205, 196, 0.5);
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.2);
}

.quest-card.completed {
    opacity: 0.6;
    background: linear-gradient(135deg, rgba(42, 63, 95, 0.3) 0%, rgba(26, 31, 58, 0.3) 100%);
}

.quest-card.completed .quest-title {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a39f 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.4);
}

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

.btn-secondary {
    background: rgba(42, 63, 95, 0.5);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.btn-secondary:hover {
    background: rgba(42, 63, 95, 0.7);
    border-color: rgba(78, 205, 196, 0.5);
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #1a1f3a 0%, #2a3f5f 100%);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(78, 205, 196, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

/* Scrollable content area in modals */
.modal-content > div.overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: rgba(78, 205, 196, 0.3) transparent;
}

.modal-content > div.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.modal-content > div.overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content > div.overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.3);
    border-radius: 3px;
}

.modal-content > div.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.5);
}

/* Mobile modal adjustments */
@media (max-width: 640px) {
    .modal-backdrop {
        padding: 10px;
    }
    
    .modal-content {
        padding: 16px;
        max-width: calc(100vw - 20px);
    }
    
    .modal-content h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast Styles */
.toast {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9) 0%, rgba(68, 163, 159, 0.9) 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 8px;
    animation: slideInDown 0.3s ease, slideOutUp 0.3s ease 2.5s forwards;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.4);
}

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

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

/* EXP Animation */
.exp-gain-animation {
    position: fixed;
    font-size: 24px;
    font-weight: bold;
    color: #ffd93d;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.8);
    animation: floatUp 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 200;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

/* Radar Chart Container */
.radar-chart-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    position: relative;
}

/* Stats Bar */
.stat-bar {
    height: 8px;
    background: rgba(42, 63, 95, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.stat-fill.health { background: linear-gradient(90deg, #ff6b35 0%, #ff5722 100%); }
.stat-fill.wisdom { background: linear-gradient(90deg, #4ecdc4 0%, #44a39f 100%); }
.stat-fill.relations { background: linear-gradient(90deg, #f06292 0%, #ec407a 100%); }
.stat-fill.wealth { background: linear-gradient(90deg, #ffd93d 0%, #ffc107 100%); }
.stat-fill.creativity { background: linear-gradient(90deg, #ab47bc 0%, #9c27b0 100%); }

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(42, 63, 95, 0.5) 0%, rgba(26, 31, 58, 0.5) 100%);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 12px;
    font-size: 24px;
    transition: all 0.3s ease;
}

.badge.earned {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2) 0%, rgba(68, 163, 159, 0.2) 100%);
    border-color: #4ecdc4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
}

/* Signal Animation */
.ripple-effect {
    position: absolute;
    border: 2px solid rgba(78, 205, 196, 0.8);
    border-radius: 50%;
    animation: ripple 1.5s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.star-particle {
    position: absolute;
    color: #ffd93d;
    animation: starFloat 2s ease-out forwards;
    pointer-events: none;
}

@keyframes starFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.5);
    }
}

/* Signal Transmission Animation */
#signal-animation-container {
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
}

#signal-animation-layer {
    pointer-events: none !important;
}

.signal-beam {
    position: fixed !important;
    width: 4px;
    background: linear-gradient(to top, 
        rgba(78, 205, 196, 0) 0%,
        rgba(78, 205, 196, 0.8) 50%,
        rgba(255, 255, 255, 0.9) 100%
    );
    transform-origin: center bottom;
    animation: beamShoot 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 10000;
}

@keyframes beamShoot {
    0% {
        height: 0;
        opacity: 0;
        transform: translateX(-50%) translateY(0);
    }
    20% {
        height: 60px;
        opacity: 1;
        transform: translateX(-50%) translateY(-30px);
    }
    100% {
        height: 120px;
        opacity: 0;
        transform: translateX(-50%) translateY(-100px);
    }
}

.signal-wave {
    position: fixed !important;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(78, 205, 196, 0.5) 20%, 
        rgba(147, 51, 234, 0.3) 40%,
        transparent 70%
    );
    border: 2px solid rgba(78, 205, 196, 0.3);
    animation: waveExpand 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.4),
                inset 0 0 20px rgba(147, 51, 234, 0.2);
    z-index: 9998;
}

@keyframes waveExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.antenna-glow {
    animation: antennaActivate 2.5s ease-out;
    transform-origin: center;
}

@keyframes antennaActivate {
    0% {
        filter: brightness(1);
        transform: scale(1) rotate(0deg);
    }
    15% {
        filter: brightness(1.8) drop-shadow(0 0 30px rgba(78, 205, 196, 1)) hue-rotate(10deg);
        transform: scale(1.15) rotate(5deg);
    }
    30% {
        filter: brightness(2.2) drop-shadow(0 0 40px rgba(147, 51, 234, 0.8)) hue-rotate(-10deg);
        transform: scale(1.1) rotate(-5deg);
    }
    50% {
        filter: brightness(1.6) drop-shadow(0 0 25px rgba(78, 205, 196, 0.6));
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        filter: brightness(1);
        transform: scale(1) rotate(0deg);
    }
}

.space-particle {
    position: fixed !important;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 200, 0.8) 30%,
        rgba(78, 205, 196, 0.6) 60%,
        rgba(147, 51, 234, 0.3) 100%
    );
    border-radius: 50%;
    opacity: 0;
    animation: spaceTravel 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8),
                0 0 15px rgba(78, 205, 196, 0.4);
    z-index: 9999;
}

@keyframes spaceTravel {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0) rotate(0deg);
        filter: blur(0) brightness(2);
    }
    5% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5) rotate(45deg);
        filter: blur(0) brightness(1.5);
    }
    15% {
        opacity: 0.9;
        transform: translate(calc(var(--tx) * 0.1), calc(var(--ty) * 0.1)) scale(1) rotate(90deg);
        filter: blur(0.5px) brightness(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), calc(var(--ty) - 150px)) scale(0.1) rotate(720deg);
        filter: blur(3px) brightness(0.5);
    }
}

.signal-ring {
    position: fixed !important;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(78, 205, 196, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ringPulse 1.5s ease-out;
    pointer-events: none;
    z-index: 9997;
}

@keyframes ringPulse {
    0% {
        width: 80px;
        height: 80px;
        opacity: 0;
        border-width: 4px;
        filter: blur(0) brightness(2);
    }
    5% {
        opacity: 1;
        filter: blur(0) brightness(1.5);
    }
    50% {
        opacity: 0.6;
        border-width: 2px;
        filter: blur(0.5px) brightness(1);
    }
    100% {
        width: 350px;
        height: 350px;
        opacity: 0;
        border-width: 0.5px;
        filter: blur(3px) brightness(0.5);
    }
}

/* Level Up Animation */
.level-up-burst {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    pointer-events: none;
    z-index: 300;
}

.burst-circle {
    position: absolute;
    inset: 0;
    border: 3px solid #ffd93d;
    border-radius: 50%;
    animation: burstExpand 1s ease-out forwards;
}

@keyframes burstExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(78, 205, 196, 0.2);
    border-top-color: #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(78, 205, 196, 0.6);
    }
}

/* Signal Count Badge */
.signal-count {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2) 0%, rgba(68, 163, 159, 0.2) 100%);
    border: 1px solid rgba(78, 205, 196, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.signal-count.high-count {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.2) 0%, rgba(255, 193, 7, 0.2) 100%);
    border-color: rgba(255, 217, 61, 0.4);
    color: #ffd93d;
}

/* Frequent Signal Button */
.frequent-signal-btn {
    position: relative;
    overflow: hidden;
}

.frequent-signal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(78, 205, 196, 0.3), transparent);
    transition: left 0.5s;
}

.frequent-signal-btn:hover::before {
    left: 100%;
}

/* Quest Tab Navigation - Mobile Optimized */
.quest-tab-container {
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    padding: 4px;
    /* Prevent touch events from bubbling during scroll */
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-x pan-y;
}

/* Visual hint for scrollable area */
.quest-tab-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(15, 23, 42, 0.8), transparent);
    pointer-events: none;
    border-radius: 0 12px 12px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.quest-tab-container:has(.quest-tab-scroll:not(:hover))::after {
    opacity: 1;
}

.quest-tab-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
}

@media (min-width: 640px) {
    .quest-tab-scroll {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }
}

.quest-tab-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.quest-tab-btn {
    padding: 8px 4px;
    background: rgba(30, 41, 59, 0.5);
    color: #9ca3af;
    border: 1px solid transparent;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    /* Prevent accidental touches */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

@media (min-width: 640px) {
    .quest-tab-btn {
        flex: 0 0 auto;
        min-width: 75px;
        padding: 8px 12px;
        scroll-snap-align: start;
        width: auto;
    }
}

.quest-tab-btn:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
}

.quest-tab-btn.active {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    border-color: rgba(78, 205, 196, 0.5);
}

.quest-tab-btn .tab-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.quest-tab-btn .tab-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Mobile specific adjustments */
@media (max-width: 640px) {
    .quest-tab-container {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.5);
    }
    
    .quest-tab-btn .tab-icon {
        font-size: 1rem;
    }
    
    .quest-tab-btn .tab-text {
        font-size: 0.65rem;
    }
    
    /* Hide scroll hint on mobile since we use grid */
    .quest-tab-container::after {
        display: none;
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .quest-tab-btn {
        min-width: 80px;
        padding: 10px 14px;
    }
}

/* Quest List Container Protection */
#quest-list {
    /* Prevent scroll from affecting other elements */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Add some padding for better scroll experience */
    padding-bottom: 20px;
}

/* PWA Install Banner */
#install-banner {
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#floating-install-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #ff6b35 100%);
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.4);
}

#floating-install-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 30px rgba(78, 205, 196, 0.6);
}

/* iOS Install Modal */
.ios-install-step {
    background: rgba(42, 63, 95, 0.3);
    border-left: 3px solid #4ecdc4;
    padding: 12px;
    margin: 8px 0;
}

/* Quest Creation Modal Styles */
.quest-type-btn[data-selected="true"],
.quest-category-btn[data-selected="true"] {
    border-width: 2px !important;
}

.quest-type-btn:hover,
.quest-category-btn:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Slogan Container */
.slogan-container {
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.slogan-container:hover {
    background: rgba(78, 205, 196, 0.1);
    transform: translateY(-1px);
}

.slogan-container p {
    margin: 0;
    transition: color 0.3s ease;
}

.slogan-container:hover p {
    color: rgba(78, 205, 196, 0.9);
}

/* Custom Quest Indicator */
.custom-quest-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Input Focus Effects */
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

/* PWA Standalone Mode Adjustments */
@media (display-mode: standalone) {
    /* Hide install prompts when running as installed app */
    #install-banner,
    #floating-install-btn {
        display: none !important;
    }
    
    /* Add safe area insets for notched devices */
    #app {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Adjust navigation for standalone mode */
    nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile Layout Fix - Prevent content hidden behind navigation */
#app {
    height: 100vh;
    height: -webkit-fill-available;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

#screen-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px; /* Space for navigation */
    position: relative;
}

/* Fixed Bottom Navigation */
nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 9999;
    background: #1e3a8a; /* bg-space-blue */
    border-top: 1px solid rgba(156, 163, 175, 0.2);
}

/* Ensure navigation stays on top of everything */
nav.fixed {
    z-index: 9999 !important;
}

/* Safe area adjustments for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(64px + env(safe-area-inset-bottom));
    }
    
    #screen-container {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* Ensure modals and toasts are above navigation */
#modals-container {
    z-index: 10000;
}

#toast-container {
    z-index: 10001;
}

/* Badge notification above everything */
.badge-notification {
    z-index: 10002;
}

/* Signal History Item Hover */
.signal-history-item {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.signal-history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(78, 205, 196, 0.2);
}

.signal-history-item:active {
    transform: translateX(3px);
}

/* Developer Info Styles */
.developer-badge {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
}

/* Sponsor Button Animation */
.sponsor-button {
    position: relative;
    overflow: hidden;
}

.sponsor-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sponsor-button:hover::before {
    width: 300px;
    height: 300px;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.heart-beat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Update Banner Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.animate-slideDown {
    animation: slideDown 0.5s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-in;
}

.animate-progress {
    animation: progress 60s linear;
}

.developer-badge::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, #9333ea 0%, #3b82f6 100%);
    opacity: 0.3;
}

.developer-badge:hover::before {
    opacity: 0.5;
}

/* Bucket List Styles */
.bucket-list-card {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
    transition: all 0.3s ease;
}

.bucket-list-card:hover {
    border-color: rgba(147, 51, 234, 0.5);
    box-shadow: 0 4px 20px rgba(147, 51, 234, 0.2);
    transform: translateY(-1px);
}

.bucket-priority-high {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #ef4444;
}

.bucket-priority-medium {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #f59e0b;
}

.bucket-priority-low {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #3b82f6;
}