/* ----- ROOT & RESET ----- */
:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --bg-grad: linear-gradient(135deg, #0f0c20 0%, #15102a 100%);
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: #a0a0b0;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
body {
    background: var(--bg-grad);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1000px;
    margin: 0;
}

/* Ambient Glows */
.glow-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.5;
    animation: float 8s ease-in-out infinite alternate;
    pointer-events: none;
}
.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: 10%;
}
.glow-2 {
    width: 500px;
    height: 500px;
    background: #fd79a8;
    bottom: -10%;
    right: 10%;
    animation-delay: -4s;
}
@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(40px) scale(1.1); }
}

/* ----- MAIN CARD (3D) ----- */
.login-container {
    position: relative;
    width: 420px;
    max-width: 94%;
    padding: 40px 35px 35px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 10;
    transform-style: preserve-3d;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
}
.login-container:hover {
    box-shadow: 0 30px 60px rgba(108, 92, 231, 0.2);
}

/* ----- AVATAR + EYES ----- */
.avatar-area {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}
.face {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    transition: 0.3s ease;
}
.eye {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: height 0.15s ease;
}
.pupil {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    transition: transform 0.05s linear;
}
/* Shy / blindfold */
.login-container.hide-password .eye {
    height: 2px;
    background: var(--text-dim);
}
.login-container.hide-password .pupil {
    display: none;
}

/* ----- TITLE & TABS ----- */
.brand-title {
    color: var(--text);
    text-align: center;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.brand-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 25px;
}
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.03);
    border-radius: 40px;
    padding: 4px;
    border: 1px solid var(--border);
}
.tab-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.25s ease;
}
.tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}
.tab-btn:hover:not(.active) {
    color: #fff;
}

/* ----- FORM ELEMENTS ----- */
.tab-content {
    display: none;
    animation: fadeUp 0.3s ease;
}
.tab-content.active {
    display: block;
}
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}
.input-group i.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    transition: color 0.3s;
    pointer-events: none;
    font-size: 15px;
}
.input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    font-size: 15px;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-group input:focus {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.06);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}
.input-group input:focus ~ i.input-icon {
    color: var(--secondary);
}

/* floating label */
.input-group label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    transition: 0.2s ease;
    font-size: 14px;
    background: transparent;
    padding: 0 4px;
}
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 16px;
    font-size: 11px;
    color: var(--secondary);
    background: #120e24;
    padding: 0 6px;
    border-radius: 4px;
}

/* password toggle */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    cursor: pointer;
    transition: 0.2s;
}
.toggle-password:hover {
    color: #fff;
}

/* utilities */
.utils {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 10px 0 20px;
}
.remember-me {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    cursor: pointer;
    gap: 6px;
}
.remember-me input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}
.forgot-pass {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}
.forgot-pass:hover {
    text-decoration: underline;
    color: #c8bfff;
}

/* submit button */
.submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--primary), #8e44ad);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 6px;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.4);
}
.submit-btn:active {
    transform: translateY(1px);
}

/* ripple */
.ripple {
    position: absolute;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-effect 0.5s linear;
    pointer-events: none;
}
@keyframes ripple-effect {
    to { transform: scale(4); opacity: 0; }
}

/* error message */
.error-box {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid #E50914;
    color: #ff7a7a;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.error-box i {
    color: #E50914;
}

/* back link */
.back-link {
    text-align: center;
    margin-top: 20px;
}
.back-link a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
}
.back-link a:hover {
    color: #fff;
}

/* Developer Credit */
.developer-credit {
    text-align: center;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 12px;
}
.developer-credit strong {
    color: var(--secondary);
}
.developer-credit i {
    color: var(--secondary);
    margin-right: 3px;
}

/* responsive */
@media (max-width: 460px) {
    .login-container { padding: 28px 18px; }
    .utils { flex-wrap: wrap; gap: 8px; }
}