@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;800&display=swap');

:root {
    --bg: #000000;
    --text: #ffffff;
    --accent: #222;
    --border: #444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Animated Background Grid --- */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 200%; height: 200%;
    background-image: 
        linear-gradient(rgba(50, 50, 50, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 50, 50, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 15s linear infinite;
    z-index: -1;
    pointer-events: none;
}
@keyframes gridMove { 0% { transform: perspective(500px) rotateX(60deg) translateY(0); } 100% { transform: perspective(500px) rotateX(60deg) translateY(50px); } }

/* --- Navbar --- */
nav {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    animation: slideDown 0.8s ease;
}
.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: 2px; }
.nav-links a { color: #888; text-decoration: none; margin-left: 20px; font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: #fff; }

/* --- Container --- */
.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    text-align: center;
}

/* --- Typography & Buttons --- */
h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; opacity: 0; animation: fadeUp 1s forwards 0.5s; }
p { color: #aaa; font-size: 1.2rem; max-width: 600px; margin-bottom: 40px; opacity: 0; animation: fadeUp 1s forwards 0.7s; }

.btn {
    padding: 15px 40px;
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.4s;
    opacity: 0;
    animation: fadeUp 1s forwards 0.9s;
    margin: 10px;
}
.btn:hover { background: #fff; color: #000; transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255,255,255,0.2); }
.btn-filled { background: #fff; color: #000; }

/* --- Forms (Login/Register) --- */
.form-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--border);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(0.9);
    animation: popIn 0.6s forwards 0.2s;
}
input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    outline: none;
    transition: 0.3s;
}
input:focus { border-color: #fff; background: #000; }

/* --- Animations Keyframes --- */
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* --- Loader --- */
.loader-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000;
    z-index: 9999; display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s;
}
.loader-bar { width: 0; height: 2px; background: #fff; animation: load 1.5s forwards; }
@keyframes load { to { width: 200px; } }