/* ===========================
   Kegstory Auth Pages CSS
   100% Synced with Landing Styling
   =========================== */

/* ----- CORE & VARS ----- */
:root {
    --a-red: #ff2a5f;
    --a-green: #00e676;
    --a-purple: #d500f9;
    --a-bg: #030305;
    --a-text: #ffffff;
    --a-text-muted: rgba(255, 255, 255, 0.6);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
}

.auth-body {
    background: var(--a-bg);
    color: var(--a-text);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----- CANVAS & BACKGROUND ANIMATIONS (Matches Landing) ----- */
.auth-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0a0a10 0%, #030305 100%);
}

.canvas-gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    mix-blend-mode: screen;
    animation: authDrift 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.canvas-red {
    top: -20%; right: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--a-red) 0%, transparent 60%);
    animation-duration: 25s;
}

.canvas-green {
    bottom: -20%; left: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, var(--a-green) 0%, transparent 60%);
    animation-duration: 30s;
    animation-direction: alternate-reverse;
}

.canvas-purple {
    top: 30%; left: 30%;
    width: 45vw; height: 45vw;
    background: radial-gradient(circle, var(--a-purple) 0%, transparent 60%);
    animation-duration: 22s;
    animation-delay: -5s;
}

@keyframes authDrift {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(5vw, 10vh) scale(1.1) rotate(60deg); }
    100% { transform: translate(-10vw, -5vh) scale(0.9) rotate(120deg); }
}

.canvas-noise {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.03;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.canvas-stars .star {
    position: absolute;
    width: 2px; height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: authTwinkle 4s infinite ease-in-out;
}

@keyframes authTwinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.6; transform: scale(1.5); box-shadow: 0 0 10px white; }
}

/* ----- LAYOUT & CARD ----- */
.auth-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.auth-card {
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ----- HEADER & LOGO ----- */
.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 24px;
}

.auth-logo-img {
    width: 64px; height: 64px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(213, 0, 249, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.auth-logo:hover .auth-logo-img {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(255, 42, 95, 0.5);
}

.auth-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--a-red), var(--a-purple), var(--a-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 200% auto;
    animation: authShine 5s linear infinite;
}

@keyframes authShine {
    to { background-position: 200% center; }
}

.auth-desc {
    color: var(--a-text-muted);
    font-size: 1rem;
    font-weight: 400;
}

/* ----- FORMS ----- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--a-text-muted);
    letter-spacing: 0.5px;
    padding-left: 4px;
    transition: color 0.3s;
}

.form-group:focus-within label {
    color: var(--a-text);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.input-icon {
    position: absolute;
    left: 18px;
    width: 20px; height: 20px;
    color: var(--a-text-muted);
    transition: color 0.3s;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: transparent;
    border: none;
    color: var(--a-text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.input-wrapper:focus-within {
    border-color: var(--a-purple);
    background: rgba(213, 0, 249, 0.05);
    box-shadow: 0 0 0 1px var(--a-purple), 0 5px 20px rgba(0,0,0,0.3);
}

.input-wrapper:focus-within .input-icon {
    color: var(--a-purple);
}

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--a-text-muted);
    cursor: pointer;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.password-toggle svg {
    width: 18px; height: 18px;
}

.password-toggle:hover {
    color: var(--a-text);
    background: rgba(255, 255, 255, 0.1);
}

/* ----- BUTTON ----- */
.auth-btn {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    margin-top: 10px;
    background: white;
    color: black;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.auth-btn .btn-text {
    position: relative;
    z-index: 2;
    transition: color 0.3s;
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--a-red), var(--a-purple), var(--a-green));
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    animation: authBtnShift 3s ease infinite;
}

@keyframes authBtnShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.2);
    color: white;
}

.auth-btn:hover .btn-text {
    color: white;
}

.auth-btn:hover .btn-glow {
    opacity: 1;
}

/* ----- FOOTER ----- */
.auth-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--a-text-muted);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--a-green);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: white;
    text-shadow: 0 0 10px var(--a-green);
}

/* ----- ALERTS ----- */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.auth-alert svg {
    width: 20px; height: 20px;
    flex-shrink: 0;
}

.error-alert {
    background: rgba(255, 42, 95, 0.15);
    border: 1px solid rgba(255, 42, 95, 0.3);
    color: #ff8ca3;
}

.info-alert {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: #8cffc0;
}

/* ----- ANIMATIONS ----- */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: authFadeUp 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes authFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ----- RESPONSIVE ----- */
@media (max-width: 480px) {
    .auth-card {
        padding: 40px 24px;
    }
    
    .auth-title {
        font-size: 1.8rem;
    }
    
    .auth-desc {
        font-size: 0.9rem;
    }
    
    .input-wrapper input {
        padding: 14px 20px 14px 48px;
    }
    
    .auth-btn {
        padding: 16px;
    }
}