/* ===== FABULA ARCANA - LOGIN PAGE CSS ===== */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0d0d1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(22, 33, 61, 0.9);
    --accent-primary: #7c3aed;
    --accent-secondary: #a855f7;
    --accent-gold: #d4af37;
    --accent-glow: rgba(124, 58, 237, 0.4);
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --text-accent: #c4b5fd;
    --border-color: rgba(124, 58, 237, 0.3);
    --danger: #ef4444;
    --success: #22c55e;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===== VIDEO BACKGROUND ===== */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) saturate(1.1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(13, 13, 26, 0.7) 100%),
        linear-gradient(180deg, rgba(13, 13, 26, 0.3) 0%, rgba(13, 13, 26, 0.6) 100%);
}

/* ===== MAIN WRAPPER ===== */
.login-wrapper {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== BACK BUTTON ===== */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    color: var(--accent-secondary);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.2));
    border-color: var(--accent-secondary);
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3);
}

/* ===== LOGIN CONTENT ===== */
.login-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===== LOGIN CARD ===== */
.login-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(15, 15, 26, 0.98));
    border-radius: 24px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    padding: 40px;
    position: relative;
    box-shadow: 
        0 0 80px rgba(124, 58, 237, 0.25),
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(168, 85, 247, 0.03);
    animation: cardAppear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Fantasy corner decorations */
.login-card::before,
.login-card::after {
    content: '?';
    position: absolute;
    font-size: 1.2rem;
    color: rgba(168, 85, 247, 0.4);
}

.login-card::before {
    top: 15px;
    left: 20px;
}

.login-card::after {
    bottom: 15px;
    right: 20px;
    transform: rotate(180deg);
}

/* ===== LOGIN HEADER ===== */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-secondary), #e879f9, var(--accent-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: purpleShimmer 3s ease infinite;
}

@keyframes purpleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.login-title::after {
    content: '?';
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 1rem;
    color: rgba(168, 85, 247, 0.5);
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== FORM STYLES ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(13, 13, 26, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-input:focus {
    border-color: var(--accent-secondary);
    background: rgba(13, 13, 26, 0.8);
    box-shadow: 
        0 0 0 3px rgba(168, 85, 247, 0.15),
        0 0 20px rgba(168, 85, 247, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: rgba(124, 58, 237, 0.4);
}

/* Validation errors */
.field-validation-error,
.text-danger {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.validation-summary-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: var(--danger);
    font-size: 0.9rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* ===== CHECKBOX ===== */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-secondary);
    cursor: pointer;
}

.form-checkbox label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-checkbox:hover label {
    color: var(--text-primary);
}

/* ===== SUBMIT BUTTON ===== */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-secondary), #c026d3);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(168, 85, 247, 0.5),
        0 0 20px rgba(168, 85, 247, 0.3);
}

.btn-login:active {
    transform: translateY(-1px);
}

/* ===== DIVIDER ===== */
.login-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    gap: 15px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
}

.login-divider span {
    color: rgba(168, 85, 247, 0.5);
    font-size: 0.9rem;
}

/* ===== LINKS ===== */
.login-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 10px;
    color: var(--text-accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.login-link:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(168, 85, 247, 0.15));
    border-color: var(--accent-secondary);
    color: #fff;
    transform: translateY(-2px);
}

.login-link.primary {
    background: linear-gradient(135deg, rgba(192, 38, 211, 0.2), rgba(168, 85, 247, 0.1));
    border-color: rgba(192, 38, 211, 0.3);
    color: #e879f9;
}

.login-link.primary:hover {
    background: linear-gradient(135deg, rgba(192, 38, 211, 0.3), rgba(168, 85, 247, 0.2));
    border-color: #c026d3;
}

/* ===== CONTACT LINK ===== */
.contact-link {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    padding: 10px 18px;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: var(--text-primary);
    border-color: var(--accent-secondary);
    background: rgba(124, 58, 237, 0.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .login-card {
        padding: 30px 25px;
        border-radius: 20px;
        max-width: 100%;
    }

    .login-logo {
        font-size: 1.5rem;
    }

    .login-title {
        font-size: 1.2rem;
    }

    .back-button {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .contact-link {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .form-input {
        padding: 12px 15px;
    }

    .btn-login {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-content {
        padding: 15px;
        align-items: flex-start;
        padding-top: 80px;
    }

    .login-card {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .login-card::before,
    .login-card::after {
        display: none;
    }

    .login-logo {
        font-size: 1.3rem;
    }

    .login-title {
        font-size: 1.1rem;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .login-form {
        gap: 15px;
    }

    .form-label {
        font-size: 0.8rem;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .btn-login {
        padding: 13px 18px;
        font-size: 0.95rem;
    }

    .login-link {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .back-button {
        top: 15px;
        left: 15px;
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .contact-link {
        top: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

@media (max-height: 700px) {
    .login-content {
        align-items: flex-start;
        padding-top: 70px;
        overflow-y: auto;
    }

    .login-card {
        margin-bottom: 20px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-form {
        gap: 15px;
    }

    .login-divider {
        margin: 18px 0;
    }
}
