/* =========================================================
 * Estilos Base do Orgz Estudos
 * =======================================================*/

/* ===== Scrollbar (apenas estética) ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
}

/* ===== Dark mode ===== */
:root {
    color-scheme: dark;
    background-color: #000;
}

/* Classes genéricas para campos de formulário */
select.field, input.field, textarea.field {
    color: #e5e7eb;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: .5rem;
    padding: .5rem;
    font-size: 1rem;
    width: 100%; /* Garante que campos ocupem todo o espaço disponível */
}
input.field:focus, select.field:focus, textarea.field:focus {
    outline: none;
    border-color: rgb(59,130,246); /* Blue 500 */
    /* Ajuste no box-shadow para o foco ficar mais visível */
    box-shadow: 0 0 0 1px rgba(59,130,246,.3), 0 0 0 4px rgba(59,130,246,.15);
}
select.field option {
    background-color: #0f0f12;
    color: #e5e7eb;
}

/* ===== Botões (DEFINIÇÃO DAS CLASSES TAILWIND UTILIZADAS) ===== */
.btn-primary {
    background-color: rgb(59,130,246);
    color: #fff;
    border: none;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover {
    background-color: rgb(37,99,235);
    box-shadow: 0 0 12px rgba(59,130,246, 0.4);
}

.btn-danger {
    background-color: rgb(239, 68, 68); /* Red 500 */
    color: #fff;
    border: none;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    transition: background-color 0.2s ease;
    font-weight: 500;
    cursor: pointer;
}
.btn-danger:hover {
    background-color: rgb(220, 38, 38); /* Red 600 */
}
.btn-ghost {
    background-color: transparent;
    color: #e5e7eb;
    border: 1px solid transparent;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    transition: background-color 0.2s ease;
    font-weight: 500;
    cursor: pointer;
}
.btn-ghost:hover {
    background-color: rgba(255,255,255,.05);
}   

/* ================================
   LOGIN — LAYOUT ISOLADO
================================ */
.login-container {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInSoft 0.8s ease-in-out;
}

/* ============================================================
    GRID PRINCIPAL — CONTROLE TOTAL
============================================================ */
.fade-in {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    gap: 1.25rem;
    animation: fadeInSoft 1.0s ease-in-out;
}

/* ============================================================
    MAIN & ASIDE
============================================================ */
main {
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-width: 0; 
}
aside {
    height: auto;
    overflow: visible;
    min-width: 0;
    max-width: 100%;
}

/* ============================================================
    CALENDÁRIO
============================================================ */
.calendar-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    min-width: 0;
}
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    min-width: 0;
}
/* Célula do dia */
.cal-cell {
    padding: .5rem;
    border-radius: .75rem;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    min-height: 80px;
    cursor: pointer;
    transition: background 0.1s ease;
}
.cal-cell:hover {
    background: rgba(255,255,255,.04);
}
.cal-cell--today {
    box-shadow: 0 0 0 2px rgba(59,130,246,.8) inset;
}
/* Eventos */
.cal-ev-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
/* Estilo do Evento (usado também no Upcoming) */
.cal-ev, .upcoming-item {
    display: flex;
    gap: 4px;
    padding: 3px 6px;
    border-radius: .45rem;
    font-size: 0.75rem; /* text-xs */
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    line-height: 1.2;
}
.cal-ev:hover, .upcoming-item:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}
.cal-ev-text {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    flex-grow: 1;
}   

.schedule-header {
    font-weight: 600;
    text-align: center;
    padding: 6px 0;
    background: rgba(255,255,255,0.04); 
    border-radius: 8px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}   

.schedule-time {
    font-size: 0.75rem;
    color: #9ca3af; /* text-gray-400 */
    display: flex;
    align-items: center;
    justify-content: center;
}   

/* ============================================================
    QUADRO DE HORÁRIOS
============================================================ */
#weekSchedule {
    width: 100%;
    overflow-x: auto;
}

#scheduleTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px;
}

#scheduleTable th,
#scheduleTable td {
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    min-width: 80px;
}

#scheduleTable thead th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
}

.schedule-time-col {
    background: rgba(255,255,255,0.05);
    font-weight: 500;
    position: sticky;
    left: 0;
    z-index: 10;
}

.schedule-subject-item {
    position: absolute;
    inset: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #fff;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid transparent;
}

.schedule-subject-item:hover {
    opacity: 0.8;
}

.schedule-subject-room {
    font-size: 0.6rem;
    opacity: 0.7;
}   

/* Ajuste final para elementos desabilitados */
button:focus-visible,
a:focus-visible {
    outline: 2px solid rgb(59,130,246);
    outline-offset: 2px;
}

/* ============================================================
    FOOTER AUTOR — ÍCONES MINIMALISTAS E CENTRALIZADOS
============================================================ */
.footer-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
/* container dos ícones */
.footer-author .footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}
/* links */
.footer-author .footer-icons a {
    color: rgb(59,130,246); /* azul padrão do site */
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
/* hover sutil */
.footer-author .footer-icons a:hover {
    opacity: 1;
    transform: translateY(-1px);
}
/* tamanho REAL dos SVGs */
.footer-author .footer-icons svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ============================================================
    EFEITOS VISUAIS: LUZ E FLARES
============================================================ */
#glow-flares {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -10; /* mais seguro para não conflitar com conteúdo */
    opacity: 0.5;
}


/* Cores e tamanhos específicos */
.flare:nth-child(2) {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.01) 60%, transparent 90%);
    width: 420px;
    height: 420px;
    filter: blur(80px);
    opacity: 0.4;
    mix-blend-mode: soft-light;
}

.flare:nth-child(3) {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.04), rgba(59, 130, 246, 0.01) 60%, transparent 90%);
    width: 320px;
    height: 320px;
    filter: blur(100px);
    opacity: 0.35;
    animation: pulseGlow 15s infinite alternate ease-in-out;
    mix-blend-mode: soft-light;
}

.flare:nth-child(1) {
    background: radial-gradient(circle at center, rgba(59,130,246,0.04), transparent 70%);
    width: 400px;
    height: 400px;
    top: 15%;
    left: 70%;
    position: absolute;
    opacity: 0.12;
    filter: blur(60px);
    z-index: -1;
}


@keyframes pulseGlow {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}
#mouseLight {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    z-index: 0;
    opacity: 0;
    will-change: transform;
}   

/* ============================================================
    MEDIA QUERIES (RESPONSIVIDADE)
============================================================ */
@media (max-width: 1280px) {
    /* Ajusta o grid principal para telas médias/pequenas */
    .fade-in {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }
    /* Sidebar esquerda (5/18) vira (4/12) */
    aside:first-child {
        grid-column: span 4 / span 4 !important;
    }
    /* Conteúdo central (8/18) vira (8/12) */
    main {
        grid-column: span 8 / span 8 !important;
    }
    /* Sidebar direita (5/18) vai para baixo (12/12) */
    aside:last-child {
        grid-column: span 12 / span 12 !important;
    }
}
@media (max-width: 768px) {
    /* Ajustes para telas de tablet (tudo em uma coluna) */
    .fade-in {
        grid-template-columns: 1fr !important;
    }
    aside:first-child, main, aside:last-child {
        grid-column: span 1 / span 1 !important;
    }
    /* Calendário e Quadro de Horários em duas colunas */
    .calendar-week-header, #calendar {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Ajusta a rolagem da tabela de horários para a tela cheia */
    #weekSchedule {
        overflow-x: auto;
        max-width: 100%;
    }
}
@media (max-width: 480px) {
    /* Ajustes para telas de celular (uma coluna) */
    .calendar-week-header, #calendar {
        grid-template-columns: 1fr !important;
    }
}

/* ===== TAGS (Matérias / Salas) ===== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}

.tag button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.8rem;
}

.tag button:hover {
    color: rgb(239,68,68);
}

.color-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-dot.active {
    border-color: white;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 100px repeat(6, 1fr); /* Coluna de horário + dias */
    gap: 8px;
    min-width: 700px;
    margin-top: 1rem;
    border-radius: 12px;
    padding: 8px;
    background: rgba(255,255,255,0.02);
}

.schedule-cell {
    min-height: 48px;
    padding: 4px;
    border-radius: 0.5rem;
    word-break: break-word;
    white-space: normal;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: rgba(255,255,255,.01);
    transition: background 0.2s ease, transform 0.1s ease;
}

.schedule-cell:hover {
    background: rgba(59,130,246,0.1);
}

/* ============================================================
    🌈 CORES TEMÁTICAS PARA MATÉRIAS
============================================================ */
/*
 * Definições base para lista de matérias (usa border-left)
 */
.color-subject-1 { background-color: rgb(239 68 68 / 0.2); border-left-color: rgb(239 68 68); } /* Red */
.color-subject-2 { background-color: rgb(249 115 22 / 0.2); border-left-color: rgb(249 115 22); } /* Orange */
.color-subject-3 { background-color: rgb(234 179 8 / 0.2); border-left-color: rgb(234 179 8); } /* Yellow */
.color-subject-4 { background-color: rgb(34 197 94 / 0.2); border-left-color: rgb(34 197 94); } /* Green */
.color-subject-5 { background-color: rgb(59 130 246 / 0.2); border-left-color: rgb(59 130 246); } /* Blue */
.color-subject-6 { background-color: rgb(168 85 247 / 0.2); border-left-color: rgb(168 85 247); } /* Violet */
.color-subject-7 { background-color: rgb(236 72 153 / 0.2); border-left-color: rgb(236 72 153); } /* Pink */
/* * APLICAÇÃO DAS CORES nos eventos (cal-ev) e quadro de horários (schedule-subject-item) */
.cal-ev.color-subject-1, .upcoming-item.color-subject-1, .schedule-subject-item.color-subject-1 { background: rgb(239 68 68 / 0.2); border-left-color: rgb(239 68 68); }
.cal-ev.color-subject-2, .upcoming-item.color-subject-2, .schedule-subject-item.color-subject-2 { background: rgb(249 115 22 / 0.2); border-left-color: rgb(249 115 22); }
.cal-ev.color-subject-3, .upcoming-item.color-subject-3, .schedule-subject-item.color-subject-3 { background: rgb(234 179 8 / 0.2); border-left-color: rgb(234 179 8); }
.cal-ev.color-subject-4, .upcoming-item.color-subject-4, .schedule-subject-item.color-subject-4 { background: rgb(34 197 94 / 0.2); border-left-color: rgb(34 197 94); }
.cal-ev.color-subject-5, .upcoming-item.color-subject-5, .schedule-subject-item.color-subject-5 { background: rgb(59 130 246 / 0.2); border-left-color: rgb(59 130 246); }
.cal-ev.color-subject-6, .upcoming-item.color-subject-6, .schedule-subject-item.color-subject-6 { background: rgb(168 85 247 / 0.2); border-left-color: rgb(168 85 247); }
.cal-ev.color-subject-7, .upcoming-item.color-subject-7, .schedule-subject-item.color-subject-7 { background: rgb(236 72 153 / 0.2); border-left-color: rgb(236 72 153); }
/* Classes de texto (Para usar em títulos ou na lista de matérias) */
.text-color-subject-1 { color: rgb(248 113 113); } /* Red 400 */
.text-color-subject-2 { color: rgb(251 146 60); } /* Orange 400 */
.text-color-subject-3 { color: rgb(250 204 21); } /* Yellow 400 */
.text-color-subject-4 { color: rgb(74 222 128); } /* Green 400 */
.text-color-subject-5 { color: rgb(96 165 250); } /* Blue 400 */
.text-color-subject-6 { color: rgb(192 132 252); } /* Violet 400 */
.text-color-subject-7 { color: rgb(244 114 182); } /* Pink 400 */   

/* === Aplicar cor diretamente na célula do Quadro de Horários === */
.schedule-cell.color-subject-1 { background-color: rgb(239 68 68 / 0.2); }
.schedule-cell.color-subject-2 { background-color: rgb(249 115 22 / 0.2); }
.schedule-cell.color-subject-3 { background-color: rgb(234 179 8 / 0.2); }
.schedule-cell.color-subject-4 { background-color: rgb(34 197 94 / 0.2); }
.schedule-cell.color-subject-5 { background-color: rgb(59 130 246 / 0.2); }
.schedule-cell.color-subject-6 { background-color: rgb(168 85 247 / 0.2); }
.schedule-cell.color-subject-7 { background-color: rgb(236 72 153 / 0.2); }

/* === ETAPA 1 (ajustada): Visual Premium com Glass Azul Suave === */

body {
    background: linear-gradient(to bottom right, #000000, #020617, #000000);
    color: #e5e7eb;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    transition: background 0.4s ease;
}


/* === EFEITO VIDRO PREMIUM AZUL SUAVE E UNIFORME === */

.glass, .glass-strong {
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(14px) saturate(110%);
    border: 1px solid rgba(59, 130, 246, 0.05);
    box-shadow:
        inset 0 0 1px rgba(255,255,255,0.06),
        inset 0 0 12px rgba(59,130,246,0.05),
        0 0 30px rgba(59,130,246,0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    will-change: backdrop-filter, box-shadow;
}

.card-glass {
    background: rgba(8, 12, 24, 0.12); /* fundo quase preto com tom azulado */
    border: 1px solid rgba(59,130,246, 0.06);
    border-radius: 12px;
    backdrop-filter: blur(8px) saturate(120%);
    box-shadow: 0 0 12px rgba(59,130,246, 0.02);
    padding: 1rem;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}


@keyframes fadeInSoft {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}   

/* ====== ANIMAÇÕES EFEITO PREMIUM ====== */

/* Entrada suave com leve slide */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse suave em botões */
@keyframes pulseBlue {
    0% { box-shadow: 0 0 0 0 rgba(59,130,246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(59,130,246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246, 0); }
}

/* Aplicar animação pulse ao clicar */
.pulse-on-click:active {
    animation: pulseBlue 0.6s ease;
}

.btn-danger {
    background-color: rgb(239, 68, 68);
    color: #fff;
    border: none;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-danger:hover {
    background-color: rgb(220, 38, 38);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}
.btn-ghost {
    background-color: transparent;
    color: #e5e7eb;
    border: 1px solid transparent;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-ghost:hover {
    background-color: rgba(255,255,255,.05);
    box-shadow: 0 0 12px rgba(255,255,255, 0.2);
}
/* ============================================================
    UTILITÁRIOS (Adicionado para flexibilidade no JS)
============================================================ */
.hidden-important {
    display: none !important;
}   

@keyframes backgroundFloat {
    0% { transform: translate(0, 0); }
    50% { transform: translate(20px, 10px); }
    100% { transform: translate(0, 0); }
}
#glow-flares .flare {
    animation: backgroundFloat 36s ease-in-out infinite alternate;
}

/* === MODO FOCO + POMODORO === */
#pomodoroModal {
    display: none; /* 🔧 CORRIGIDO! */
    position: fixed;
    inset: 0;
    z-index: 50;    
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}

.pomodoro-box {
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.06);
    box-shadow: 0 0 30px rgba(59,130,246, 0.1);
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 360px;
    text-align: center;
    color: #e5e7eb;
}

.pomodoro-box h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

#pomodoroTimer {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

#pomodoroModal button {
    margin-top: 1rem;
}

#pomodoroModal.hidden {
  display: none !important;
}
#pomodoroModal.flex {
  display: flex !important;
}


/* Fim do arquivo style.css */

