/* ============================================
   SETTINGS.CSS - Modal de Configuracoes
   Responsivo e proporcional (max 6.9")
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');

:root {
    --gold-light: #fef08a;
    --gold-dark: #a16207;
    --wood-depth: #2a1a0c;
}

/* settings.css */
.avatar-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
    background: rgba(0, 0, 0, 0.05);
    font-size: 28px;
}

.avatar-option:hover {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.1);
}

.avatar-option.selected {
    border-color: #00C9A7;
    box-shadow: 0 0 12px #00C9A7;
    background: rgba(0, 201, 167, 0.15);
    transform: scale(1.1);
}

/* Fundo Escuro Transparente (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.3s ease;
}

/* A Caixa do Modal */
/* A Caixa do Modal */
.modal-box {
    width: calc(100% - var(--space-lg) * 2);
    max-width: calc(var(--max-app-width) - var(--space-xl) * 2);
    height: 80dvh;
    max-height: 80dvh;

    /* BACKGROUND IMAGE FUNDO1 */
    background-image: url('../../../assets/images/home/fundo1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Fallback color if image fails */
    background-color: #fdf6e3;
    border: 4px solid var(--wood-border);

    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Cabecalho */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md, 16px);

    /* HEADER BACKGROUND BARRA REMOVED */
    background-color: transparent;

    border-bottom: none;
    z-index: 2;
    flex-shrink: 0;
    min-height: 110px;
}

/* TITLE STYLE - MATCHES RANKING */
/* TITLE STYLE - MATCHES RANKING */
.modal-title {
    margin: 0;
    font-family: 'Luckiest Guy', cursive;
    /* Updated Font */
    font-weight: 400;
    font-size: clamp(20px, 6vw, 24px);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
    text-shadow:
        0 2px 0 #5d4037,
        0 4px 4px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
}

#settings-modal .close-btn {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s;
}

#settings-modal .close-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

#settings-modal .close-btn:hover {
    transform: scale(1.1);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.5) 0%, transparent 70%);
}

#settings-modal .close-btn:active {
    transform: scale(0.95);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.7) 0%, transparent 70%);
}

/* Conteudo */
.modal-content {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
    background-color: transparent;
    /* Changed from var(--bg-light) to show modal-box background */
}

/* Secoes */
/* Secoes */
.settings-section {
    background: rgba(255, 255, 255, 0.7);
    /* More transparent (was 0.9) */
    /* Semi-transparent */
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(139, 69, 19, 0.1);
    /* Subtle wood tint border */
}

.section-title {
    margin: 0 0 var(--space-md) 0;
    /* PREMIUM SUBTITLE STYLE */
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #8B4513;

    /* Gradient for consistency */
    background: linear-gradient(to bottom, #d97706 0%, #78350f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);

    /* PREMIUM LABEL STYLE */
    font-family: 'Luckiest Guy', cursive;
    font-size: 1rem;
    color: #5d4037;
    /* Brownish for readability */

    text-shadow: 1px 1px 0px #fff;
}

.setting-row:last-child {
    margin-bottom: 0;
}

/* Sliders */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 50%;
    height: 6px;
    background: var(--border-color);
    border-radius: 5px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: clamp(18px, 5vw, 22px);
    height: clamp(18px, 5vw, 22px);
    background: var(--primary);
    border-radius: var(--radius-full);
    cursor: pointer;
}

/* Toggle Switch */
.toggle-row {
    cursor: pointer;
}

.toggle-row input {
    display: none;
}

.toggle-switch {
    position: relative;
    width: clamp(44px, 12vw, 50px);
    height: clamp(24px, 7vw, 28px);
    background-color: var(--border-color);
    border-radius: var(--radius-xl);
    transition: background-color 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: clamp(20px, 6vw, 24px);
    height: clamp(20px, 6vw, 24px);
    background-color: white;
    border-radius: var(--radius-full);
    transition: transform 0.3s;
}

.toggle-row input:checked+.toggle-switch {
    background-color: var(--primary);
}

.toggle-row input:checked+.toggle-switch::after {
    transform: translateX(22px);
}

/* Select e Botoes */
.language-select {
    width: 100%;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

.settings-section .action-btn {
    width: 100%;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    font-size: var(--font-sm);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.settings-section .action-btn:last-child {
    margin-bottom: 0;
}

.logout-btn {
    background-color: var(--border-color);
    color: #374151;
}

.logout-btn:hover {
    background-color: #D1D5DB;
}

.delete-btn {
    background-color: #FEE2E2;
    color: var(--danger);
}

.delete-btn:hover {
    background-color: #FECACA;
}

.action-btn:active {
    transform: scale(0.98);
}

/* ============================================
   RESPONSIVIDADE
============================================ */

/* Animação que faz o brilho "correr" pela letra */
@keyframes textShimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}