/* ============================================
   INDEX / AUTH PAGES - AURORA GLASS
   ============================================ */

body.index-page {
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

/* Background Blobs for Auth */
body.index-page::before, body.index-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.2;
    animation: auth-float 20s infinite ease-in-out;
}
body.index-page::before {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--color-primary), transparent);
}
body.index-page::after {
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--color-secondary), transparent);
    animation-delay: -5s;
}

@keyframes auth-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -50px) scale(1.1); }
}

.index-container {
    width: 100%;
    max-width: 440px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 48px;
    backdrop-filter: blur(24px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: auroraFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

.index-brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    margin: 0 auto 32px;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.index-container:hover .index-brand-logo {
    transform: scale(1.05) rotate(5deg);
}

.index-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    font-family: 'Outfit';
    letter-spacing: -0.02em;
}

.index-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 40px;
    font-weight: 500;
}

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

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    margin-left: 4px;
}

.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: white;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.error-msg {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #fda4af;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.auth-footer {
    margin-top: 32px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.auth-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
}

.auth-footer a:hover {
    color: var(--color-secondary);
}

/* ============================================
   CONNECTED STATE STYLES
   ============================================ */

.index-connected-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: auroraFadeIn 0.6s ease-out;
}

.index-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%; /* CERCLE */
    object-fit: cover;
    border: 4px solid var(--color-primary);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.index-avatar:hover {
    transform: scale(1.08) rotate(3deg);
    border-color: var(--color-secondary);
    box-shadow: 0 0 40px rgba(45, 212, 191, 0.5);
}

.index-username {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit';
    letter-spacing: -0.01em;
}

.index-check-icon {
    color: var(--color-secondary);
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.5));
}

.index-connected-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 320px;
    margin-bottom: 8px;
}

.index-main-action {
    width: 100%;
    padding: 16px !important;
    font-size: 1.05rem !important;
    border-radius: 16px !important;
}

@media (max-width: 480px) {
    .index-container {
        padding: 28px 20px;
        margin: 16px;
        border-radius: 24px;
    }

    .index-avatar {
        width: 100px;
        height: 100px;
    }

    .index-username {
        font-size: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}

