/* Main CSS file that imports all other stylesheets */
@import url('variables.css');
@import url('base.css');
@import url('typography.css');
@import url('layout.css');
@import url('components.css');
@import url('game.css');
@import url('animations.css'); /* Make sure this line is included */
@import url('mobile.css');

/* Game controls at the top */
.game-controls-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 16px 24px 8px 24px;
    background: linear-gradient(90deg, #2b5876 0%, #4e4376 100%);
    border-bottom: 2px solid #fff2;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 12px rgba(44,62,80,0.08);
    position: relative;
    z-index: 10;
}

/* Stylish game buttons */
.game-btn {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(30,60,114,0.10);
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    outline: none;
    letter-spacing: 0.5px;
    margin-left: 0;
}

.game-btn:hover, .game-btn:focus {
    background: linear-gradient(135deg, #185a9d 0%, #43cea2 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(30,60,114,0.18);
}

.game-btn:active {
    background: #185a9d;
    transform: scale(0.98);
}

/* Sound toggle button styling */
.game-btn.muted {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.game-btn.muted:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

/* Icon styles */
.rescue-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.teamwork-icon {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

/* Game Title Styling */
.game-title-container {
    text-align: center;
    margin-bottom: 12px;
    animation: titleEntry 1s ease-out;
    max-width: 100%;
}

.game-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0 0 6px 0;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.title-word {
    display: inline-block;
    animation: wordBounce 2s ease-in-out infinite;
}

.title-word:nth-child(2) {
    animation-delay: 0.3s;
}

.subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.mode-selection-prompt {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f093fb;
    text-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

/* Mode Button Container */
.mode-buttons-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
    max-width: 100%;
}

/* Enhanced Player Mode Buttons */
.player-mode-button {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.9), rgba(74, 58, 168, 0.9));
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px 10px;
    color: white;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 130px;
    max-width: 150px;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px) scale(0.8);
    flex: 0 1 auto;
}

.player-mode-button.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.player-mode-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.player-mode-button:hover::before {
    left: 100%;
}

.player-mode-button:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.player-mode-button.selected {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.8);
    animation: selectedPulse 0.5s ease-in-out;
}

/* Single Player Specific */
.single-player {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
}

.single-player:hover {
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.5);
}

/* Multi Player Specific */
.multi-player {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.9), rgba(245, 87, 108, 0.9));
}

.multi-player:hover {
    box-shadow: 0 25px 50px rgba(240, 147, 251, 0.5);
}

/* AI Co-Op Specific */
.ai-coop {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
}

.ai-coop:hover {
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.5);
}

/* Mode Icon */
.mode-icon {
    position: relative;
    margin-bottom: 6px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-avatar {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    animation: avatarFloat 3s ease-in-out infinite;
}

.player-avatar.solo {
    animation-delay: 0s;
}

.player-avatar.duo {
    animation-delay: 0.5s;
}

/* Mode Content */
.mode-title {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.mode-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0;
    opacity: 0.9;
    line-height: 1.1;
}

.mode-description {
    display: none;
}

/* Glow Effect */
.mode-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.player-mode-button:hover .mode-glow {
    opacity: 1;
}

/* Particles Effect */
.mode-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mode-particles::before,
.mode-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
}

.mode-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.mode-particles::after {
    top: 60%;
    right: 25%;
    animation-delay: 2s;
}

/* Animations */
@keyframes titleEntry {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(5deg); }
    66% { transform: translateY(5px) rotate(-3deg); }
}

@keyframes particleFloat {
    0%, 100% { 
        opacity: 0; 
        transform: translateY(0) scale(0.5); 
    }
    50% { 
        opacity: 1; 
        transform: translateY(-20px) scale(1); 
    }
}

@keyframes selectedPulse {
    0% { transform: scale(1.05); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.1); }
}