/* Ababil360 Elite Responsive Frame */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    background-color: #020202; 
    background-image: radial-gradient(circle at center, #1a0505 0%, #000000 100%);
    width: 100vw;
    height: 100vh;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden; 
}

#game-container { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

canvas { 
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Keeps ratio intact on any screen */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 0 2px rgba(255, 50, 50, 0.4);
}

#loading-screen { display: none; }
/* Ababil360 Orientation Lock */
#rotate-device {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #0a0a1a;
    color: #D4AF37;
    z-index: 9999;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
}
@media screen and (orientation: portrait) {
    #game-container { display: none !important; }
    #rotate-device { display: flex; }
}
/* Ababil360 Auth UI */
#auth-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.auth-box {
    background: #0a0a1a; border: 2px solid #D4AF37; padding: 40px;
    border-radius: 12px; width: 400px; text-align: center;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
}
.auth-box h2 { color: #D4AF37; font-family: Arial; margin-bottom: 20px; font-size: 28px; }
.auth-box input {
    width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #333;
    background: #111; color: #fff; border-radius: 6px; font-size: 16px; outline: none;
}
.auth-box input:focus { border-color: #D4AF37; }
.auth-box button {
    width: 100%; padding: 14px; margin-bottom: 10px; border: none;
    background: #D4AF37; color: #000; font-size: 16px; font-weight: bold;
    border-radius: 6px; cursor: pointer; transition: 0.3s;
}
.auth-box button:hover { background: #FFD700; transform: scale(1.02); }
#register-btn { background: #222; color: #D4AF37; border: 1px solid #D4AF37; }
#register-btn:hover { background: #D4AF37; color: #000; }
#auth-msg { color: #FF0000; font-family: Arial; margin-bottom: 15px; font-weight: bold; min-height: 20px; }
/* Ababil360 Dashboard UI Architecture */
.dashboard-body { display: flex; height: 100vh; overflow: hidden; background: #05050a; color: #fff; font-family: Arial, sans-serif; align-items: flex-start; justify-content: flex-start; }
.sidebar { width: 260px; height: 100vh; background: #0a0a1a; border-right: 1px solid #222; padding: 30px 0; display: flex; flex-direction: column; }
.brand { font-size: 26px; font-weight: bold; color: #D4AF37; text-align: center; margin-bottom: 50px; letter-spacing: 3px; }
.nav-links { list-style: none; width: 100%; }
.nav-links li { margin-bottom: 5px; }
.nav-links a { display: block; padding: 16px 30px; color: #888; text-decoration: none; font-size: 15px; font-weight: bold; transition: 0.3s; }
.nav-links a i { margin-right: 12px; width: 20px; text-align: center; }
.nav-links a:hover, .nav-links li.active a { background: #111; color: #D4AF37; border-left: 4px solid #D4AF37; }
.nav-links .logout { color: #ff4d4d; margin-top: auto; }
.nav-links .logout:hover { background: rgba(255, 77, 77, 0.1); border-left-color: #ff4d4d; }

.main-content { flex: 1; padding: 40px; overflow-y: auto; height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid #222; }
.welcome { font-size: 20px; color: #aaa; }
.welcome span { color: #D4AF37; font-weight: bold; }
.balance-badge { background: #111; border: 1px solid #D4AF37; padding: 12px 25px; border-radius: 30px; color: #FFD700; font-weight: bold; font-size: 18px; box-shadow: 0 0 15px rgba(212,175,55,0.2); }

.section-title { margin-bottom: 30px; font-size: 24px; color: #fff; letter-spacing: 1px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.game-card { background: #111; border-radius: 14px; overflow: hidden; border: 1px solid #222; transition: 0.4s; }
.game-card:hover { transform: translateY(-8px); border-color: #D4AF37; box-shadow: 0 15px 30px rgba(212,175,55,0.15); }
.game-card img { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid #222; }
.game-info { padding: 25px; text-align: center; }
.game-info h3 { margin-bottom: 20px; font-size: 20px; color: #eee; }
.play-btn { display: inline-block; width: 100%; padding: 14px; background: #D4AF37; color: #000; text-decoration: none; font-weight: bold; font-size: 16px; border-radius: 8px; border: none; cursor: pointer; transition: 0.3s; }
.play-btn:hover { background: #FFD700; }
.locked img { filter: grayscale(100%) opacity(0.4); }
.disabled { background: #222; color: #555; cursor: not-allowed; border: 1px solid #333; }