@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body, html {
    height: 100%;
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-header {
    position: absolute;
    top: 2.5rem;
    left: 2.5rem;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 5px; 
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    z-index: 20; 
    pointer-events: none; 
}

.top-actions-container {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    display: flex;
    gap: 10px;
    z-index: 110;
}

.action-btn {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.04);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.action-btn .hidden {
    display: none !important;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: brightness(0.6) contrast(1.05);
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.bg-slide.active {
    opacity: 1;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(0, 0, 0, 0.65) 100%);
    z-index: 0;
    pointer-events: none;
    transition: opacity
    0.3s ease, visibility 0.5s ease; 
    will-change: opacity;
}

.container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    width: 100%;
    height: 100%;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    background-color: transparent;
}

.timer-modes {
    position: absolute;
    top: 2.5rem;
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mode-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    padding: 10px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.mode-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.pomo-stages, #timer-setup {
    display: flex !important;
    align-items: center;
    gap: 16px;
    margin-bottom: 2rem;
    height: 54px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s linear;
}

#timer-setup {
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.pomo-stages.hidden, #timer-setup.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    margin-bottom: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.pomo-stage-btn, .anime-stage-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.4);
    padding: 10px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    pointer-events: none; 
    transform: scale(0.98);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.pomo-stage-btn.active, .anime-stage-btn.active {
    background: #7c3aed;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    font-weight: 800;
    transform: scale(1.18);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.quote {
    font-size: 30px;
    font-weight: 500;
    font-style: italic;
    opacity: 0.85;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: opacity 0.5s ease-in-out;
    padding: 0 20px;
    height: 36px;
}

.timer-display {
    font-size: 180px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 2rem;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

#timer-setup input {
    background: transparent;
    border: none;
    border-bottom: 3px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    width: 50px;
    text-align: center;
    outline: none;
}

#timer-setup input:focus {
    border-bottom-color: #7c3aed;
}

#timer-setup span {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
}

#timer-setup input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

#timer-setup input::-webkit-outer-spin-button,
#timer-setup input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    width: 120px;
    height: 48px;
}

.btn:hover {
    background: #6d28d9;
    transform: translateY(-1px);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.changelog-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
}

.changelog-toggle {
    list-style: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.changelog-toggle::-webkit-details-marker { 
    display: none; 
}

.changelog-box {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 16px;
    width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.changelog-box h3 { 
    color: #fff; 
    margin-bottom: 12px; 
    font-size: 1.1rem;
}

.changelog-box ul { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

.changelog-box li { 
    font-size: 0.9rem; 
    color: rgba(255, 255, 255, 0.75); 
}

.changelog-archive-divider { 
    border: 0; 
    height: 2.5px; 
    margin: 16px 0; 
    background-color: #7c3aed;
}

.audio-widget-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
}

.audio-details-wrapper { 
    display: flex; 
    flex-direction: column-reverse; 
}

.audio-summary-toggle {
    list-style: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-summary-toggle::-webkit-details-marker { 
    display: none; 
}

.audio-pulse-dot, .changelog-dot {
    width: 6px;
    height: 6px;
    background-color: #7c3aed;
    border-radius: 50%;
    box-shadow: 0 0 8px #7c3aed;
}

.audio-panel-box {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 16px;
    width: 310px;
    max-height: 390px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.audio-panel-box::-webkit-scrollbar { 
    display: none; 
}

.widget-section { 
    width: 100%; 
}

.section-title { 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: #ffffff; 
    margin-bottom: 12px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.subtitle { 
    font-size: 0.75rem; 
    color: rgba(255, 255, 255, 0.4); 
}

.widget-divider { 
    border: 0; 
    height: 1px; 
    background: rgba(255, 255, 255, 0.1); 
    margin: 16px 0; 
}

.pill-group { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
    margin-bottom: 12px; 
}

.pill-btn, .ambient-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover, .ambient-btn:hover { 
    background: rgba(255, 255, 255, 0.12); 
    color: #fff; 
}

.pill-btn.active, .ambient-btn.active { 
    background: #7c3aed; 
    color: #fff; 
    border-color: rgba(255, 255, 255, 0.15); 
}

.url-input-container { 
    display: flex; 
    gap: 6px; 
    margin-bottom: 12px; 
}

.url-input-container input { 
    flex: 1; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    background: rgba(0, 0, 0, 0.2); 
    border-radius: 10px; 
    padding: 8px 12px; 
    font-size: 0.8rem; 
    color: #fff; 
    outline: none; 
}

.url-input-container input::placeholder { 
    color: rgba(255, 255, 255, 0.3); 
}

.url-input-container input:focus { 
    border-color: #7c3aed; 
}

.url-input-container button { 
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 10px; 
    width: 32px; 
    height: 32px; 
    cursor: pointer; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.spotify-embed-wrapper { 
    border-radius: 12px; 
    overflow: hidden; 
    height: 200px; 
    background: #000000; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
}

.volume-slider-container { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-size: 0.8rem; 
    color: rgba(255, 255, 255, 0.7); 
    margin-top: 8px; 
}

.volume-slider-container input[type="range"] {
    flex: 1; 
    accent-color: #7c3aed; 
    cursor: pointer; 
    height: 4px; 
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 2px; 
}

@media (max-width: 768px) {
    .brand-header { 
        top: 1.2rem; 
        left: 50%; 
        transform: translateX(-50%); 
        font-size: 1.05rem; 
        letter-spacing: 4px; 
    }
    .top-actions-container {
        top: 1rem;
        right: 1.2rem;
    }
    .action-btn { 
        width: 40px; 
        height: 40px; 
    }
    .timer-display { 
        font-size: 5.5rem; 
    }
    .quote { 
        font-size: 1.2rem; 
    }
    .timer-modes { 
        top: 1rem; 
    }
    .mode-btn { 
        padding: 6px 14px; 
        font-size: 0.95rem; 
    }
    .pomo-stage-btn, .anime-stage-btn { 
        padding: 8px 18px; 
        font-size: 0.95rem; 
    }
    .changelog-container { 
        bottom: 1.2rem; 
        right: 1.2rem; 
    }
    .audio-widget-container { 
        bottom: 1.2rem; 
        left: 1.2rem; 
    }
    .audio-panel-box { 
        width: 260px; 
        padding: 14px; 
    }
}

@media (max-width: 480px) {
    .timer-display { 
        font-size: 4rem; 
    }
    .quote { 
        font-size: 1rem; 
    }
}

body.minimalist {
    background: url("images/minimalist.webp") no-repeat center / cover !important;
}

body.minimalist .bg-slide,
body.minimalist .vignette {
    display: none !important;
}

body.minimalist .timer-modes,
body.minimalist .action-btn,
body.minimalist .changelog-toggle,
body.minimalist .audio-summary-toggle {
    background: rgba(45, 45, 45, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.minimalist .audio-panel-box,
body.minimalist .changelog-box {
    background: rgba(30, 30, 30, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
