/* Cyberpunk Login - v4 Final Fix */

/* --- 1. FORCE RESET (Crucial Fix) --- */
/* This overrides your global 'min-height: 100%' rule so inputs/headers don't stretch */
.cyber-wrapper h1,
.cyber-wrapper h2,
.cyber-wrapper h3,
.cyber-wrapper h4,
.cyber-wrapper h5,
.cyber-wrapper h6,
.cyber-wrapper input,
.cyber-wrapper button,
.cyber-wrapper label,
.cyber-wrapper .cyber-group,
.cyber-wrapper .cyber-input-wrapper {
    min-height: 0 !important; /* Force reset to natural height */
    height: auto !important;  /* Ensure natural sizing */
    margin-bottom: 0;         /* Reset vague margins */
}

/* Re-apply specific height to inputs only where needed */
.cyber-wrapper input.cyber-input {
    height: 48px !important; 
    margin-bottom: 0 !important;
}

/* --- 2. Color Variables --- */
:root {
    --cyber-bg: #e2e8f0;
    --cyber-glass: rgba(255, 255, 255, 0.85);
    --cyber-border: rgba(255, 255, 255, 0.9);
    --cyber-text: #0f172a;
    --cyber-text-muted: #64748b;
    --cyber-primary: #0891b2; /* Cyan */
    --cyber-accent: #db2777;  /* Pink */
    --cyber-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    --grid-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --cyber-bg: #020617;
    --cyber-glass: rgba(15, 23, 42, 0.9);
    --cyber-border: rgba(56, 189, 248, 0.2);
    --cyber-text: #f1f5f9;
    --cyber-text-muted: #94a3b8;
    --cyber-primary: #22d3ee;
    --cyber-accent: #f472b6;
    --cyber-shadow: 0 0 40px rgba(6, 182, 212, 0.15);
    --grid-color: rgba(34, 211, 238, 0.1);
}

/* --- 3. Wrapper --- */
.cyber-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    margin-top: 20px;
    background-color: var(--cyber-bg);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    padding: 30px 15px;
    font-family: 'Rajdhani', sans-serif;
}

/* --- 4. Main Card --- */
.cyber-console {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1000px;
    /* Height is determined by content, no forced min-height */
    background: var(--cyber-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--cyber-border);
    box-shadow: var(--cyber-shadow);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    align-items: stretch; /* Stretch children to match height */
}

.cyber-console::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--cyber-primary), var(--cyber-accent));
    z-index: 10;
}

/* --- 5. Left Side: Announcement --- */
.cyber-left {
    flex: 1;
    padding: 40px;
    border-right: 1px solid var(--cyber-border);
    position: relative;
    display: block; /* Ensures standard block layout */
}

.cyber-badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--cyber-primary);
    border: 1px solid var(--cyber-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    background: rgba(6, 182, 212, 0.05);
    min-height: auto !important; /* Safety override */
}

/* Content Text Overrides */
.cyber-announcement-content, 
.cyber-announcement-content * {
    color: var(--cyber-text) !important;
    background: transparent !important;
    border-color: var(--cyber-border) !important;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: auto !important; /* Safety override */
}

.cyber-announcement-content a {
    color: var(--cyber-primary) !important;
    text-decoration: underline;
}

/* --- 6. Right Side: Login Form --- */
.cyber-right {
    flex: 0 0 420px;
    padding: 50px 40px;
    background: rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns content to TOP */
}

.cyber-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--cyber-text);
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 5px;
    letter-spacing: 1px;
    line-height: 1.2;
    min-height: auto !important;
}

.cyber-subtitle {
    font-size: 13px;
    color: var(--cyber-text-muted);
    margin-bottom: 30px;
    font-family: 'Poppins', sans-serif;
    min-height: auto !important;
}

/* --- 7. Inputs --- */
.cyber-group {
    margin-bottom: 20px;
    min-height: auto !important;
}

.cyber-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--cyber-primary);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 1px;
    min-height: auto !important;
}

.cyber-input-wrapper {
    position: relative;
    min-height: auto !important;
}

.cyber-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyber-text-muted);
    font-size: 14px;
    pointer-events: none;
    transition: 0.3s;
    z-index: 5;
    min-height: auto !important;
}

/* Input Specifics */
.cyber-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--cyber-border);
    color: var(--cyber-text);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
    /* Height is forced in Section 1, but reinforced here */
    box-sizing: border-box;
}


[data-theme="dark"] .cyber-input {
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

[data-theme="dark"] .cyber-input:focus {
    background: rgba(0, 0, 0, 0.3) !important; /* Darker background */
    color: black !important;                 /* Force PURE WHITE text */
    border-color: rgba(255, 255, 255, 0.15);
}


.cyber-input:focus {
    border-color: var(--cyber-primary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    outline: none;
}

.cyber-input:focus + i {
    color: var(--cyber-primary);
}

/* --- 8. Buttons --- */
.btn-cyber {
    width: 100%;
    padding: 14px;
    margin-top: 15px;
    background: var(--cyber-primary);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: all 0.2s;
    cursor: pointer;
    min-height: auto !important; /* Override global rule */
}

[data-theme="dark"] .btn-cyber {
    color: #000;
}

.btn-cyber:hover {
    background: var(--cyber-accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(219, 39, 119, 0.5);
}

/* --- 9. Footer --- */
.cyber-footer {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    min-height: auto !important;
}

.cyber-link {
    color: var(--cyber-text-muted);
    text-decoration: none;
}
.cyber-link:hover { color: var(--cyber-primary); }

/* --- 10. Mobile --- */
@media (max-width: 991px) {
    .cyber-console {
        flex-direction: column;
    }
    .cyber-left {
        border-right: none;
        border-bottom: 1px solid var(--cyber-border);
        padding: 30px;
    }
    .cyber-right {
        width: 100%;
        flex: none;
        padding: 30px;
    }
}