/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', 'Arial', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-in-out 3s forwards;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 30px #00ff88;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.loading-text {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00aaff);
    border-radius: 2px;
    animation: loadingProgress 3s ease-in-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 30px #00ff88;
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 50px #00ff88, 0 0 80px #00ff88;
    }
}

@keyframes loadingProgress {
    to {
        width: 100%;
    }
}

/* Main Content */
.main-content {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.main-content.hidden {
    opacity: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    position: relative;
    padding: 2rem 0;
    background: linear-gradient(135deg, #111111, #1a1a1a);
    border-bottom: 2px solid #333;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo-section {
    flex: 1;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 20px #00ff88;
    margin-bottom: 0.5rem;
    animation: glow 3s ease-in-out infinite alternate;
}

.tagline {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 400;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
}

.login-btn {
    background: linear-gradient(45deg, #ff0080, #ff4080);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: linear-gradient(45deg, #ff4080, #ff60a0);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 128, 0.3);
}

@keyframes glow {
    0% {
        text-shadow: 0 0 20px #00ff88;
    }
    100% {
        text-shadow: 0 0 30px #00ff88, 0 0 40px #00ff88;
    }
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    text-align: center;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #cccccc;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 15px #00ff88;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 600;
}

/* Section Titles */
.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Games Section */
.games-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: #00ff88;
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.2);
}

.game-card:hover::before {
    opacity: 1;
}

.game-preview {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.game-icon {
    transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.1) rotate(5deg);
}

.game-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.game-description {
    color: #cccccc;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.difficulty-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-easy {
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: #000000;
}

.difficulty-medium {
    background: linear-gradient(45deg, #ffaa00, #ff8800);
    color: #000000;
}

.difficulty-hard {
    background: linear-gradient(45deg, #ff0080, #cc0066);
    color: #ffffff;
}

.difficulty-unknown {
    background: linear-gradient(45deg, #666666, #444444);
    color: #ffffff;
}

.game-category {
    color: #cccccc;
    font-size: 0.9rem;
    font-weight: 600;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: #000000;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-btn:hover {
    background: linear-gradient(45deg, #00cc66, #00aa44);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.play-btn.disabled {
    background: linear-gradient(45deg, #666666, #444444);
    color: #cccccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* Coming Soon */
.coming-soon-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
}

.coming-soon .game-preview {
    position: relative;
}

.coming-soon-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00ff88;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.mystery {
    opacity: 0.5;
    filter: blur(1px);
}

/* Leaderboard Section */
.leaderboard-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
}

.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #333;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1.5fr;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: #000000;
    font-weight: 700;
    font-size: 1.1rem;
}

.leaderboard-list {
    padding: 0;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1.5fr;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #333;
    align-items: center;
    transition: background 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(0, 255, 136, 0.1);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: #00ff88;
}

.player {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    font-size: 1.5rem;
}

.player-name {
    font-weight: 600;
}

.score {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: #ffffff;
}

.game {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Login Section */
.login-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
}

.login-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.login-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 3rem;
}

.login-form-container {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 3rem;
    border-radius: 15px;
    border: 2px solid #333;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: #000000;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: linear-gradient(45deg, #00cc66, #00aa44);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.login-note {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.login-note p {
    color: #00ff88;
    font-size: 0.9rem;
    margin: 0;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #111111, #0a0a0a);
    padding: 3rem 0 1rem;
    border-top: 2px solid #333;
}

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

.footer-section h3,
.footer-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
}

.footer-tagline {
    color: #cccccc;
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-nav a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #00ff88;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #cccccc;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.social-link:hover {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #666666;
    font-size: 0.9rem;
}

/* Floating Play Button */
.floating-play-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: #000000;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
    animation: float 3s ease-in-out infinite;
}

.floating-play-btn:hover {
    background: linear-gradient(45deg, #00cc66, #00aa44);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.5);
}

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

/* Responsive Design */
/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-card {
        padding: 1.5rem;
    }
    
    .leaderboard-header,
    .leaderboard-item {
        grid-template-columns: 0.8fr 2fr 1fr;
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .game {
        display: none;
    }
    
    .login-form-container {
        padding: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .floating-play-btn {
        display: flex;
        bottom: 1rem;
        right: 1rem;
    }
    
    .loading-logo {
        font-size: 2rem;
    }
    
    .loading-bar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .game-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .leaderboard-header,
    .leaderboard-item {
        grid-template-columns: 0.8fr 2fr;
        gap: 0.5rem;
    }
    
    .score {
        display: none;
    }
    
    .floating-play-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* Performance Optimizations */
.game-card,
.play-btn,
.nav-link,
.social-link {
    will-change: transform;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
