/* Karmic Insights Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a23 0%, #1a1a3a 50%, #2a1a5a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    color: #ffffff;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ffffff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 4s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(13, 13, 30, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 2.5em;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    animation: gameGlow 3s ease-in-out infinite alternate;
}

@keyframes gameGlow {
    from { 
        text-shadow: 0 0 20px rgba(255, 107, 107, 0.5), 0 0 40px rgba(78, 205, 196, 0.3); 
    }
    to { 
        text-shadow: 0 0 30px rgba(255, 107, 107, 0.8), 0 0 60px rgba(78, 205, 196, 0.6); 
    }
}

.header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-btn, .admin-btn {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: linear-gradient(45deg, #4a148c, #6a1b9a, #8e24aa);
    color: white;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.admin-btn {
    background: linear-gradient(45deg, #8B4513, #CD853F, #DAA520);
    color: white;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(138, 43, 226, 0.6);
}

.admin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 69, 19, 0.6);
}

.games-intro {
    text-align: center;
    margin-bottom: 50px;
    background: rgba(13, 13, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mystical-text {
    font-size: 1.2em;
    line-height: 1.6;
    color: #E6E6FA;
    text-shadow: 0 0 10px rgba(230, 230, 250, 0.3);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.game-card {
    background: rgba(13, 13, 30, 0.9);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(78, 205, 196, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(78, 205, 196, 0.1), transparent);
    transition: left 0.6s ease;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #4ECDC4;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(78, 205, 196, 0.4);
}

.game-card.coming-soon {
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

.game-card.coming-soon:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.2);
}

.game-icon {
    font-size: 4em;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(78, 205, 196, 0.5));
    animation: float 3s ease-in-out infinite;
}

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

.game-card.coming-soon .game-icon {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.game-title {
    font-size: 1.8em;
    color: #4ECDC4;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(78, 205, 196, 0.5);
}

.game-card.coming-soon .game-title {
    color: #B8B8D4;
}

.game-description {
    color: #E6E6FA;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 1em;
}

.game-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 15px;
}

.feature {
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.4);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    color: #4ECDC4;
    backdrop-filter: blur(5px);
}

.game-card.coming-soon .feature {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #B8B8D4;
}

.play-btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(45deg, #4ECDC4, #45B7D1, #96CEB4);
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(78, 205, 196, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
    align-self: center;
}

.play-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(78, 205, 196, 0.6);
    background: linear-gradient(45deg, #45B7D1, #96CEB4, #4ECDC4);
}

.coming-soon-btn {
    display: inline-block;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    color: #B8B8D4;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    cursor: not-allowed;
    margin-top: auto;
    align-self: center;
}

.games-footer {
    text-align: center;
    background: rgba(13, 13, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.games-footer p {
    color: #E6E6FA;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.suggestion {
    color: #4ECDC4;
    font-style: italic;
    font-size: 1em !important;
}

/* iOS Safari background fix */
@supports (-webkit-touch-callout: none) {
    body {
        background-attachment: scroll;
        background-size: 100% 100%;
        background-repeat: no-repeat;
    }
    
    body::before {
        position: absolute;
        background-attachment: scroll;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .header-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-btn, .admin-btn {
        width: 100%;
        justify-content: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .game-card {
        padding: 25px 20px;
    }
    
    .game-icon {
        font-size: 3em;
    }
    
    .game-title {
        font-size: 1.5em;
    }
    
    .play-btn, .coming-soon-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .games-intro {
        padding: 20px 15px;
    }
    
    .mystical-text {
        font-size: 1em;
    }
    
    .game-card {
        padding: 20px 15px;
    }
    
    .feature {
        font-size: 0.8em;
        padding: 4px 8px;
    }
}