/* ============================================
   OYUN MABEDİ DINO - Cyberpunk Theme CSS
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;700&display=swap');

/* CSS Variables */
:root {
    --neon-cyan: #00f3ff;
    --neon-magenta: #ff00ff;
    --neon-purple: #b026ff;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --glass-bg: rgba(10, 10, 20, 0.85);
    --glass-border: rgba(0, 243, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --success: #00ff88;
    --danger: #ff3366;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow: hidden;
}

/* ============================================
   LOGIN OVERLAY
   ============================================ */

#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--darker-bg) 0%, #0d0d1a 50%, #1a0a1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Animated Background Grid */
#login-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Login Container */
.login-container {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 50px 40px;
    width: 90%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 0 40px rgba(0, 243, 255, 0.1),
        0 0 80px rgba(176, 38, 255, 0.05),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    animation: containerGlow 3s ease-in-out infinite alternate;
}

@keyframes containerGlow {
    0% { box-shadow: 0 0 40px rgba(0, 243, 255, 0.1), 0 0 80px rgba(176, 38, 255, 0.05); }
    100% { box-shadow: 0 0 60px rgba(0, 243, 255, 0.2), 0 0 100px rgba(176, 38, 255, 0.1); }
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-cyan));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s linear infinite;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
    letter-spacing: 2px;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Dino Icon */
.dino-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: dinoBounce 1s ease-in-out infinite;
}

@keyframes dinoBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2), inset 0 0 20px rgba(0, 243, 255, 0.05);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

/* Login Button */
.login-btn {
    position: relative;
    padding: 18px 30px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 10px;
    color: var(--darker-bg);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 243, 255, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

/* ============================================
   LEADERBOARD PANEL
   ============================================ */

#leaderboard-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 280px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
}

#leaderboard-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

.leaderboard-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
}

.leaderboard-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-list {
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
}

.leaderboard-list::-webkit-scrollbar {
    width: 4px;
}

.leaderboard-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.leaderboard-item:hover {
    background: rgba(0, 243, 255, 0.1);
    transform: translateX(-5px);
}

.leaderboard-item.gold { border-left: 3px solid #ffd700; }
.leaderboard-item.silver { border-left: 3px solid #c0c0c0; }
.leaderboard-item.bronze { border-left: 3px solid #cd7f32; }

.rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 50%;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    margin-right: 12px;
}

.leaderboard-item.gold .rank { background: rgba(255, 215, 0, 0.2); color: #ffd700; }
.leaderboard-item.silver .rank { background: rgba(192, 192, 192, 0.2); color: #c0c0c0; }
.leaderboard-item.bronze .rank { background: rgba(205, 127, 50, 0.2); color: #cd7f32; }

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.player-score {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    color: var(--neon-magenta);
    font-weight: 700;
}

/* ============================================
   CHEAT DETECTED MODAL
   ============================================ */

#cheat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#cheat-modal.visible {
    opacity: 1;
    visibility: visible;
}

.cheat-content {
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0a1a 100%);
    border: 2px solid var(--danger);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    animation: shake 0.5s ease-in-out;
    box-shadow: 0 0 50px rgba(255, 51, 102, 0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

.cheat-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.cheat-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--danger);
    margin-bottom: 20px;
}

.cheat-message {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-line;
    margin-bottom: 30px;
}

.cheat-close-btn {
    padding: 15px 40px;
    background: var(--danger);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cheat-close-btn:hover {
    background: #ff5577;
    transform: scale(1.05);
}

/* ============================================
   CURRENT PLAYER INFO
   ============================================ */

#current-player {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 20px;
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.5s ease;
}

#current-player.visible {
    opacity: 1;
    transform: translateX(0);
}

#current-player .player-icon {
    font-size: 1.5rem;
}

#current-player .player-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--neon-cyan);
}

/* ============================================
   GAME CONTAINER ADJUSTMENTS
   ============================================ */

.offline .interstitial-wrapper {
    color: #2b2b2b;
    font-size: 1em;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 600px;
    padding-top: 100px;
    width: 100%;
}

/* Hide original message box */
#messageBox {
    display: none !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .login-container {
        padding: 40px 30px;
        margin: 20px;
    }
    
    .logo-title {
        font-size: 1.5rem;
    }
    
    #leaderboard-panel {
        width: 220px;
        top: 10px;
        right: 10px;
        padding: 15px;
    }
    
    .leaderboard-header h3 {
        font-size: 0.85rem;
    }
    
    .player-name {
        max-width: 80px;
    }
    
    #current-player {
        top: 10px;
        left: 10px;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .logo-title {
        font-size: 1.2rem;
    }
    
    .dino-icon {
        font-size: 3rem;
    }
    
    #leaderboard-panel {
        width: 180px;
        font-size: 0.85rem;
    }
    
    .cheat-content {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .cheat-title {
        font-size: 1.4rem;
    }
}
