/* =========================================
   GIAO DIỆN POMODORO & FULLSCREEN ĐỘNG
========================================= */
:root {
    --border-ink: 4px solid #111111;
    --shadow-solid: 8px 8px 0px #111111;
    
    /* Màu nền */
    --clr-pomo: #ff595e;     
    --clr-short: #8ac926;    
    --clr-long: #1982c4;     
    --clr-focus-45: #ffca3a; 
    --clr-focus-60: #6a4c93; 
    
    --clr-text: #111;
}

.pomo-neo-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--clr-text);
    background: var(--clr-pomo); 
    padding: 30px;
    border: var(--border-ink);
    border-radius: 20px;
    box-shadow: var(--shadow-solid);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.8s ease, transform 0.3s;
    overflow: hidden;
}
.pomo-neo-wrapper * { box-sizing: border-box; }

/* Grid Ma trận đen (Classic Breathing) */
.pomo-grid-overlay {
    position: absolute;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    z-index: 0;
    background-color: #111;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.15) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 2px, transparent 2px);
    background-size: 50px 50px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.theme-classic-breath-active { background: #111 !important; }
.theme-classic-breath-active .pomo-grid-overlay {
    opacity: 1;
    animation: gridBreath 10s ease-in-out infinite alternate;
}
@keyframes gridBreath {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); } 
}

/* Đổi màu text sang Trắng nổi trên nền đen */
.theme-classic-breath-active .time-text { color: #fff; text-shadow: 6px 6px 0px rgba(255,255,255,0.2); }
.theme-classic-breath-active .pomo-header h2, .theme-classic-breath-active .pomo-header p { color: #fff; }
.theme-classic-breath-active .pomo-header { background: rgba(0,0,0,0.5); border-color: #fff; }
.theme-classic-breath-active .btn-float-top { background: #111; color: #fff; border-color: #fff; }

.pomo-header, .pomo-notify-banner, .pomo-themes, .pomo-modes, .pomo-timer-display, .pomo-controls, .btn-float-top {
    z-index: 1;
    position: relative;
}

/* -------------------------------------
   XỬ LÝ KHI VÀO CHẾ ĐỘ FULLSCREEN 
-------------------------------------- */
.pomo-neo-wrapper:fullscreen {
    max-width: 100vw; width: 100vw; height: 100vh;
    border: none; border-radius: 0; box-shadow: none;
    justify-content: center; padding: 50px;
}

/* Ẩn Header, Các nút Mode, Nút Tạm dừng và Bỏ qua */
.pomo-neo-wrapper:fullscreen .pomo-header,
.pomo-neo-wrapper:fullscreen .pomo-modes,
.pomo-neo-wrapper:fullscreen #pomo-pause,
.pomo-neo-wrapper:fullscreen #pomo-skip { 
    display: none !important; 
}

/* Đưa Theme Selector xuống góc dưới phải, dạng dọc và làm mờ */
.pomo-neo-wrapper:fullscreen .pomo-themes { 
    position: absolute; 
    bottom: 30px; 
    right: 30px; 
    flex-direction: column; 
    background: transparent;
    opacity: 0.15; 
    transition: opacity 0.3s;
    margin: 0;
    padding: 0;
}
.pomo-neo-wrapper:fullscreen .pomo-themes:hover { opacity: 1; }
.pomo-neo-wrapper:fullscreen .time-text { font-size: 16vw; }

/* Float Top Button */
.btn-float-top { 
    position: absolute; top: 20px; right: 20px; width: 45px; height: 45px; 
    border: 3px solid #111; border-radius: 50%; background: #fff; color: #111;
    cursor: pointer; box-shadow: 3px 3px 0px #111; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.btn-float-top:active { box-shadow: 0px 0px 0px #111; transform: translate(3px, 3px); }

/* Banner & Header */
.pomo-header { text-align: center; margin-bottom: 20px; background: rgba(255,255,255,0.9); padding: 15px; border-radius: 12px; border: var(--border-ink); width: 100%; transition: all 0.3s;}
.pomo-header h2 { margin: 0 0 5px 0; font-size: 2rem; font-weight: 900; text-transform: uppercase;}
.pomo-header p { margin: 0; font-weight: 800; font-size: 1rem;}

.pomo-notify-banner { display: flex; justify-content: space-between; align-items: center; width: 100%; background: #fff; border: 3px dashed #111; border-radius: 12px; padding: 12px 15px; margin-bottom: 20px; font-weight: 800; font-size: 0.95rem; gap: 10px;}
.pomo-btn-small { padding: 8px 12px; background: #111; color: #fff; border: 2px solid #111; border-radius: 6px; font-weight: 900; cursor: pointer; box-shadow: 3px 3px 0px #fff; white-space: nowrap;}

/* Theme Buttons (Đổi thành Icon tròn) */
.pomo-themes { display: flex; gap: 15px; margin-bottom: 20px; background: rgba(0,0,0,0.15); padding: 10px 20px; border-radius: 50px; justify-content: center;}
.theme-btn { width: 45px; height: 45px; font-size: 1.3rem; border: 3px solid #111; border-radius: 50%; background: #fff; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 0px #111;}
.theme-btn:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #111; }
.theme-btn.active { background: #111; color: #fff; box-shadow: 2px 2px 0px #fff;}

/* Mode Buttons */
.pomo-modes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; width: 100%; justify-content: center;}
.mode-btn { flex: 1; min-width: 130px; padding: 12px 10px; font-size: 1rem; font-weight: 900; background: rgba(255,255,255,0.7); border: 3px solid #111; border-radius: 12px; cursor: pointer; box-shadow: 3px 3px 0px #111; transition: all 0.1s;}
.mode-btn.active { background: #111; color: #fff; box-shadow: 1px 1px 0px #111; transform: translate(2px, 2px);}

/* Đồng hồ chính */
.pomo-timer-display { text-align: center; margin-bottom: 40px; }
.time-text { font-size: 7rem; font-weight: 900; font-family: monospace, system-ui; letter-spacing: -3px; color: #111; line-height: 1; text-shadow: 4px 4px 0px rgba(255,255,255,0.7); transition: font-size 0.3s, color 0.3s;}
.status-text { font-size: 1.4rem; font-weight: 900; text-transform: uppercase; margin-top: 10px; background: #111; color: #fff; display: inline-block; padding: 5px 20px; border-radius: 20px; border: 2px solid #fff;}

/* Nút Điều khiển */
.pomo-controls { display: flex; gap: 20px; justify-content: center; width: 100%; flex-wrap: wrap;}
.ctrl-btn { padding: 20px 40px; font-size: 1.5rem; font-weight: 900; border: 4px solid #111; border-radius: 16px; cursor: pointer; text-transform: uppercase; box-shadow: 6px 6px 0px #111; transition: all 0.1s; flex: 1; max-width: 250px;}
.ctrl-btn:active { box-shadow: 2px 2px 0px #111; transform: translate(4px, 4px); }
.btn-primary { background: #fff; color: #111; }
.btn-secondary { background: #ffca3a; color: #111; }
.btn-skip { background: #111; color: #fff; box-shadow: 6px 6px 0px rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.5);}

/* Hiệu ứng 1: Theme Flow */
.theme-flow-active { background: linear-gradient(-45deg, var(--clr-pomo), var(--clr-focus-45), var(--clr-long), var(--clr-focus-60)); background-size: 400% 400%; animation: gradientFlow 15s ease infinite; }
@keyframes gradientFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Hiệu ứng 2: Theme Breath */
.theme-breath-active { background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 60%); background-size: 200% 200%; animation: breathPulsate 8s ease-in-out infinite; }
@keyframes breathPulsate { 0% { background-position: center; background-size: 100% 100%; } 50% { background-position: center; background-size: 250% 250%; } 100% { background-position: center; background-size: 100% 100%; } }

@media (max-width: 600px) {
    .time-text { font-size: 5rem; }
    .mode-btn { min-width: 100px; padding: 10px 5px;}
    .ctrl-btn { padding: 15px 20px; font-size: 1.2rem; }
}