:root {
    --primary-color: #f12c4c; /* Blaze Red */
    --secondary-color: #00e676; /* JonBet Green */
    --bg-dark: #09090b;
    --card-bg: rgba(20, 20, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --input-bg: rgba(0, 0, 0, 0.3);
    --glow-color: rgba(241, 44, 76, 0.5);
}

/* Reset & Base */
#login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    overflow: hidden;
    z-index: 9999;
}

/* Background Effects */
.login-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.login-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/background_login.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15; /* Transparência suave */
    z-index: -1;
}

.effect-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #4f46e5; /* Indigo */
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}



/* Floating Support Buttons */
.floating-support {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.floating-support a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.floating-support a:hover {
    transform: scale(1.1) translateX(-5px);
}

#telegram-support-button:hover { background: #0088cc; box-shadow: 0 0 20px rgba(0, 136, 204, 0.6); }
#instagram-support-button:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); box-shadow: 0 0 20px rgba(220, 39, 67, 0.6); }
#whatsapp-support-button:hover { background: #25D366; box-shadow: 0 0 20px rgba(37, 211, 102, 0.6); }

/* Main Card */
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    z-index: 2;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 20px;
    max-height: 95vh;
    overflow-y: auto;
}

/* Header */
.card-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 15px;
}

#login-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;    
    position: relative;
    z-index: 2;
}



.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    filter: blur(20px);
    opacity: 0.5;
    z-index: 1;
}





.brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.5px;
    animation: colorSwapMain 4s infinite ease-in-out;
}

.text-highlight {
    color: var(--primary-color);
    animation: colorSwapHighlight 4s infinite ease-in-out;
}

@keyframes colorSwapMain {
    0%, 100% { color: var(--text-main); }
    50% { color: var(--primary-color); }
}

@keyframes colorSwapHighlight {
    0%, 100% { color: var(--primary-color); }
    50% { color: var(--text-main); }
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 5px 0 0 0;
}

/* Announcement */
.announcement-box {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.1), rgba(0, 230, 118, 0.05));
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.announcement-icon {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.announcement-content h3 {
    margin: 0;
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
}

.announcement-content p {
    margin: 3px 0 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tabs */
.auth-tabs-wrapper {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 5px;
    position: relative;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    color: white;
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-glider {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Form Sections */
.forms-wrapper {
    position: relative;
    /* overflow: hidden; Removed to prevent label clipping */
    min-height: 300px; /* Adjust based on content */
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(20px);
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    padding-top: 10px; /* Space for floating label */
}

.auth-form.active-form {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: all;
}

.auth-form.hidden-form {
    display: none; /* Fallback for layout calculation */
}

/* Modern Inputs */
.input-group-modern {
    position: relative;
    width: 100%;
}

.input-group-modern input {
    width: 100%;
    padding: 12px 15px 12px 40px; /* Space for icon in label if needed, or adjust padding */
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.input-group-modern input:focus {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(241, 44, 76, 0.1);
}

.input-group-modern label {
    position: absolute;
    left: 15px;
    top: 0;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 6px;
    background: #27272a;
    border-radius: 4px;
    z-index: 100; /* Garante que fique acima do input */
    
    /* Ensure label is not cut off */
    overflow: visible;
    white-space: nowrap;
    line-height: 1.2;
}

.input-group-modern input:focus + label,
.input-group-modern input:not(:placeholder-shown) + label,
.input-group-modern input:hover + label {
    color: var(--primary-color);
}

.input-row {
    display: flex;
    gap: 15px;
}

.input-row .half {
    width: 50%;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: white;
}



/* Buttons */
.btn-primary-modern, .btn-secondary-modern {
    position: relative;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary-color), #d02040);
}

.btn-secondary-modern {
    background: linear-gradient(135deg, var(--secondary-color), #00c853);
    color: #000;
}

.btn-primary-modern:hover, .btn-secondary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
    animation: btnShine 3s infinite;
}

@keyframes btnShine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.form-options {
    display: flex;
    justify-content: flex-end;
    font-size: 0.85rem;
}

.forgot-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary-color);
}

.mobile-switch-link {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 15px;
}

.mobile-switch-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Error Message */
.error-message {
    min-height: 20px;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-align: center;
    font-weight: 600;
}

/* Footer */
.card-footer {
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    margin-top: auto;
}

/* Spinner */
.login-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 25px;
        margin: 10px;
        max-width: 100%;
        border-radius: 20px;
    }
    
    .floating-support {
        top: 10px;
        right: 10px;
    }
    
    .floating-support a {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .orb-1, .orb-2 {
        opacity: 0.3;
    }
}
