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

body {
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(#0a0a1a, #000);
    color: white;
}

/* CHUVA */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* VIDEO (login page background only) */
video.bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.logo {
    position: absolute;
    top: 50px;
    left: 50px;
    width: 200px;
    z-index: 2;
}

/* =============================================
   LOGIN CARD
   ============================================= */
.login {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 2;
    width: 340px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(135, 206, 235, 0.14);
    border-radius: 20px;
    padding: 28px 26px 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* TABS */
.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 22px;
    overflow: hidden;
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #87CEEB, #F0F8FF);
    border-radius: 9px;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.tabs.register-active .tab-indicator {
    transform: translateX(100%);
}

.tab-btn {
    position: relative;
    z-index: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.25s;
    box-shadow: none;
    width: 100%;
}

.tab-btn:hover {
    transform: none;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
}

.tab-btn.active {
    color: #0a0a1a;
}

/* AUTH FORMS */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: formFadeIn 0.22s ease both;
}

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

/* INPUT GROUP */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 13px;
    width: 15px;
    height: 15px;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}

.input-group input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    outline: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #F8F8FF;
    font-size: 14px;
    font-family: inherit;
    backdrop-filter: blur(10px);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-group input:focus {
    border-color: rgba(135, 206, 235, 0.5);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.12);
    background: rgba(135, 206, 235, 0.07);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* TOGGLE PASSWORD */
.toggle-pw {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.2s, background 0.2s;
    box-shadow: none;
}

.toggle-pw svg {
    width: 15px;
    height: 15px;
    pointer-events: none;
}

.toggle-pw:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

/* SUBMIT BUTTON */
.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, #87CEEB, #F0F8FF);
    color: black;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    margin-top: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(135, 206, 235, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   MOUSE TRAIL
   ============================================= */
.trail-text {
    position: fixed;
    color: #87CEEB;
    font-size: 12px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    animation: fadeOut 0.5s linear forwards;
    font-weight: bold;
    text-shadow: 0 0 8px #87CEEB;
    z-index: 999;
    user-select: none;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 480px) {
    .logo {
        width: 120px;
        top: 20px;
        left: 20px;
    }

    .login {
        width: calc(100vw - 32px);
        padding: 22px 16px 26px;
    }

    /* Prevent iOS auto-zoom */
    .input-group input {
        font-size: 16px;
    }
}

/* =============================================
   GLOBAL BUTTON (kept from original)
   ============================================= */
button {
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, #87CEEB, #F0F8FF);
    color: black;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    transform: scale(1.05);
}

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard {
    display: flex;
    background: #0a0a1a;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    height: 100vh;
    background: #111;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar h2 {
    color: #87CEEB;
}

.sidebar a {
    color: #ccc;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s;
    cursor: pointer;
}

.sidebar a:hover {
    background: rgba(135, 206, 235, 0.2);
}

/* MAIN */
.main {
    flex: 1;
    padding: 40px;
}

.main h1 {
    margin-bottom: 30px;
}

/* CARDS */
.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    width: 300px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.card input {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.card button {
    margin-top: 10px;
    width: 100%;
}

/* LOGOUT */
.logout {
    display: inline-block;
    margin-top: 30px;
    color: red;
}
