@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand: #7C3AED;
    --brand-glow: #9D5CF6;
    --brand-gradient: linear-gradient(135deg, #7C3AED, #A855F7);
    --bg-base: #0A0A0F;
    --bg-surface: #17171F;
    --bg-elevated: #1E1E2A;
    --border-color: #27272E;
    --text-primary: #F1F1F3;
    --text-muted: #9090A8;
}

html, body {
    background-color: var(--bg-base) !important;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

/* Sidebar custom */
.mud-drawer {
    background-color: #111118 !important;
    border-right: 1px solid var(--border-color) !important;
}

.mud-nav-link.active {
    background: rgba(124, 58, 237, 0.15) !important;
    color: #F1F1F3 !important;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.3);
    border-radius: 10px;
}

.mud-nav-link:hover {
    background: rgba(255,255,255,0.05) !important;
    border-radius: 10px;
}

/* Gradient button */
.btn-gradient {
    background: var(--brand-gradient) !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.6);
}

/* Cards */
.crialix-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: border-color 0.2s ease;
}

.crialix-card:hover {
    border-color: rgba(124, 58, 237, 0.4);
}

/* Video thumbnail gradient */
.video-thumb {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.6));
}

/* Status badges */
.badge-completed { background: rgba(16,185,129,0.15); color: #10B981; }
.badge-processing { background: rgba(124,58,237,0.15); color: #9D5CF6; }
.badge-error { background: rgba(239,68,68,0.15); color: #EF4444; }

/* Glow text */
.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Shimmer animation for processing */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(124,58,237,0.3), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.8s linear infinite;
}

/* Glow pulse for processing badge */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(124,58,237,0); }
}

.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3A3A4A; }

/* AppBar override */
.mud-appbar { border-bottom: 1px solid var(--border-color) !important; }

/* Auth pages (login, cadastro, lembrar senha) */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--brand);
}

.auth-field .validation-message {
    color: #EF4444;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

.auth-submit {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.auth-submit:hover { transform: translateY(-1px); }

.auth-links {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-links a {
    color: var(--brand-glow);
    text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

/* Login split-screen */
.login-split {
    display: flex;
    min-height: 100vh;
}

.login-form-col {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    padding: 2rem 2.5rem;
    max-width: 640px;
}

.login-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.1rem;
}

.login-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.login-back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}

.login-back-link:hover { color: var(--text-primary); }

.login-tagline {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 6px;
}

.login-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 0;
}

.login-heading {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.login-subheading {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
    margin-bottom: 1.5rem;
}

.login-forgot-link {
    color: var(--brand-glow);
    font-size: 0.75rem;
    text-decoration: none;
}

.login-forgot-link:hover { text-decoration: underline; }

.login-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.login-hero-col {
    flex: 1 1 50%;
    position: relative;
    background: linear-gradient(180deg, #19192A, #0A0A0F);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-hero-glow {
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.3);
    filter: blur(90px);
    pointer-events: none;
}

.login-hero-content {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 2rem;
}

.login-hero-card {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #7C3AED, #EC4899);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.35);
    margin-bottom: 1.5rem;
}

.login-hero-card-preview {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124,58,237,0.6), rgba(236,72,153,0.6));
}

.login-hero-card-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(10,10,15,0.7);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.login-hero-stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.login-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.login-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.login-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    text-align: center;
}

@media (max-width: 900px) {
    .login-hero-col { display: none; }
    .login-form-col { max-width: none; }
}

/* Manage account tabs */
.manage-tab {
    padding: 10px 4px;
    margin-right: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.manage-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand);
}

/* Stats card */
.stat-card {
    background: rgba(23,23,31,0.6);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
}

/* Hero card glow */
.hero-card {
    background: linear-gradient(180deg, #19192A, #111118);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: rgba(124,58,237,0.25);
    filter: blur(60px);
    pointer-events: none;
}
