@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,700&family=Luckiest+Guy&family=Oxanium:wght@200..800&display=swap');

:root {
    --bg-main: #0B1C40; /* Brighter deep blue to match dashboard */
    --bg-gradient: radial-gradient(circle at top center, #15316B 0%, #0B1C40 100%);
    --card-bg: rgba(22, 43, 90, 0.7); /* Match dashboard glass */
    --glass-blur: blur(20px);
    --primary-color: #00FF88;
    --secondary-color: #00C853;
    --accent-blue: #00A6FF;
    --accent-gold: #FFD700;
    --text-main: #FFFFFF;
    --text-muted: #8FA5C7;
    --border-glass: 1px solid rgba(0, 255, 136, 0.2);
    --font-heading: 'Luckiest Guy', cursive;
    --font-body: 'Chakra Petch', sans-serif;
    --font-clean: 'Oxanium', sans-serif;
    --shadow-glossy: 0 20px 40px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.05);
}

body {
    font-family: var(--font-clean);
    background-color: var(--bg-main) !important;
    background-image: var(--bg-gradient) !important;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    color: var(--text-main);
    position: relative;
    overflow-x: hidden;
}

/* Atmospheric Game Glow (Repositioned to match dashboard) */
body::before {
    content: '';
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Animated Cyber Grid overlay (Added from dashboard) */
body::after {
    content: '';
    position: fixed;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    transform: perspective(600px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 5s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: perspective(600px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(600px) rotateX(60deg) translateY(40px) translateZ(-200px); }
}

.login-container {
    width: 100%;
    max-width: 440px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.window-header {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.dot-red { background-color: #FF5F56; }
.dot-yellow { background-color: #FFBD2E; }
.dot-green { background-color: #27C93F; }

.theme-toggle {
    width: 36px;
    height: 36px;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary-color);
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(255, 215, 0, 0.4);
    transform: scale(1.1);
}

/* Game Banner Area */
.top-section {
    padding: 40px 20px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.illustration-img {
    width: 160px;
    height: auto;
    border-radius: 30px; /* Blend the white box corners */
    filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.4));
    animation: float 5s ease-in-out infinite;
    position: relative;
    z-index: 5;
    background: white; /* Keep white for visibility but give it a glossy frame */
    padding: 10px;
    border: 4px solid var(--accent-blue);
    box-shadow: 0 0 30px rgba(0, 166, 255, 0.4);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}



/* Form Section */
.login-form-section {
    padding: 20px 35px 30px;
    position: relative;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 42px;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

/* Glossy Glass Inputs */
.form-control {
    font-family: var(--font-body);
    background: rgba(11, 28, 64, 0.6) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 18px !important;
    padding: 12px 20px 12px 50px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    height: 64px !important;
    color: var(--text-main) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary-color) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 10px rgba(0, 242, 255, 0.2) !important;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--primary-color);
    z-index: 5;
}

.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.forgot-password {
    text-align: right;
    margin-bottom: 25px;
}

.forgot-password a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: color 0.2s;
    letter-spacing: 0.5px;
}

.forgot-password a:hover {
    color: #FFF;
    text-shadow: 0 0 10px var(--accent-gold);
}

/* 3D Convex Game Button */
.btn-login {
    font-family: var(--font-heading);
    background: linear-gradient(90deg, var(--accent-blue), var(--primary-color)) !important;
    border: none !important;
    border-radius: 20px !important;
    color: #0b1c40 !important; /* Deep blue text for sharp contrast */
    font-size: 24px !important;
    height: 68px !important;
    width: 100% !important;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.5) !important;
}

.btn-login:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3) !important;
}

/* Glossy highlight for 3D button */
.btn-login::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 10%;
    width: 80%;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    border-radius: 40px;
    pointer-events: none;
}

.register-link {
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 15px;
}

.register-link a { 
    color: var(--primary-color); 
    text-decoration: none;
    font-weight: 800; 
}

.register-link a:hover {
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

@media (max-width: 500px) {
    body {
        padding: 0;
    }
    .login-container { 
        border-radius: 0; 
        margin: 0; 
        border: none;
        box-shadow: none;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    .login-title { font-size: 30px; }
    .illustration-img { width: 130px; }
    .window-header { display: none; } /* Remove macOS window dots on mobile fullscreen */
    
    .login-form-section {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .login-footer {
        margin-top: auto;
    }
}