/* 
   Premium Pomodoro UI - Full Rewrite 
   Aesthetics: Glassmorphism, Sophisticated Shadows, Dynamic Transitions
*/

.pomodoro-container {
    width: 100%;
    margin: 0 auto;
    padding: 0.5rem 24px 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    z-index: 10;
    min-height: 0;
    box-sizing: border-box;
}

/* Card Width Consistency */
.pomodoro-card,
.tasks-section,
.stats-summary,
.main-page-header,
.app-tour-section,
.pomo-info-section {
    width: 100%;
    max-width: var(--card-width, 620px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}


/* Integrated Panel Base */
.glass-panel {
    background: var(--card-bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 24px;
    box-shadow: none;
    color: #fff;
    transition: var(--theme-transition);
}

/* Main Timer Card */
.pomodoro-card {
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 76vh;
}

.pomodoro-modes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 5px;
    border-radius: 14px;
    margin: 0 auto;
    width: fit-content;
    flex-shrink: 0;
}

.mode-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--theme-transition);
    opacity: 0.7;
    white-space: nowrap;
}

.mode-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Timer Display with SVG Ring */
.timer-display-container {
    position: relative;
    width: clamp(190px, 38vw, 240px);
    height: clamp(190px, 38vw, 240px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
    stroke: #fff;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

.progress-ring__circle-bg {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.1));
}

.time-label {
    font-size: clamp(48px, 14vw, 72px);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -3px;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    color: #fff;
    transition: font-size 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Action Buttons */
.timer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
}

.actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-btn {
    background: #ffffff;
    border: none;
    color: var(--color-main);
    padding: 0 3.5rem;
    height: 54px;
    border-radius: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 0 #ebebeb;
    transition: all 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.action-btn:hover {
    background: #fdfdfd;
}

.action-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 transparent;
}

.action-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
    backdrop-filter: blur(5px);
}

.skip-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--theme-transition);
}

.skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

/* Tasks Section */
.tasks-section {
    position: relative;
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.tasks-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.list-menu-btn {
    padding: 8px;
    border-radius: 10px;
}

/* Task Items */
.tasks-list-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0.5rem;
}

.task-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.15s;
    position: relative;
    overflow: hidden;
    border-left: 6px solid transparent;
    border-bottom: 1px solid #f0f0f0;
}

.task-item:first-child {
    border-radius: 8px 8px 0 0;
}

.task-item:last-child {
    border-radius: 0 0 8px 8px;
    border-bottom: none;
}

.task-item:only-child {
    border-radius: 8px;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.task-item::before {
    display: none;
}

.task-item.active {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
    box-shadow: none;
    border-left: 6px solid #fff;
}

.task-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.task-checkbox {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid #dcdcdc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: transparent;
}

.task-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.task-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-note-preview {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6) !important;
    background: none;
    padding: 0;
    border-radius: 0;
    display: inline-block;
}

.task-item:hover .task-checkbox {
    border-color: #bbb;
}

.task-item.completed {
    opacity: 0.5;
}

.task-item.completed .task-checkbox {
    background: #bbb;
    border-color: #bbb;
}

.task-item.completed .task-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #999 !important;
}

.task-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.task-count {
    font-size: 0.95rem;
    font-weight: 700;
    color: #bbb !important;
}

.task-edit-btn {
    padding: 6px !important;
    border-radius: 6px !important;
    transition: all 0.2s;
    opacity: 0;
    background: transparent !important;
    border: none !important;
    color: #bbb !important;
}

.task-item:hover .task-edit-btn {
    opacity: 1;
    background: transparent !important;
}

.task-edit-btn:hover {
    color: #888 !important;
}

.add-task-btn {
    width: 100%;
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.add-task-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Task Form Enhancement */
.task-form {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-form-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#task-title-input {
    background: transparent;
    border: none;
    border-bottom: none;
    color: #fff !important;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 4px 0;
    width: 100%;
    outline: none;
    font-style: italic;
}

#task-title-input::placeholder {
    color: #ccc;
    font-style: italic;
    font-weight: 700;
}

#task-title-input:focus {
    border-color: transparent;
}

.est-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.est-control>span {
    font-size: 0.85rem;
    font-weight: 800;
    color: #555 !important;
}

.counter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pomo-input {
    background: #efefef !important;
    border: none;
    color: #555 !important;
    width: 75px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.counter-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd !important;
    border-radius: 6px;
    background: #fff !important;
    color: #999 !important;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.counter-btn:hover {
    background: #f5f5f5 !important;
    border-color: #bbb !important;
}

.task-note-expand {
    color: #999 !important;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.task-note-expand:hover {
    color: #666 !important;
    text-decoration: underline;
}

.form-note-input {
    background: #f9f9f9 !important;
    border: 1px solid #eee !important;
    color: #555 !important;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-note-input::placeholder {
    color: #bbb;
}

.form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2) !important;
    padding: 14px 1.5rem;
    border-radius: 0 0 10px 10px;
}

.form-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.cancel-btn {
    background: transparent !important;
    color: #999 !important;
}

.cancel-btn:hover {
    color: #555 !important;
}

.save-btn {
    background: #333 !important;
    color: #fff !important;
    border-radius: 6px;
}

.save-btn:hover {
    background: #222 !important;
}

.delete-btn {
    background: transparent !important;
    color: #ff5f5f !important;
}

.delete-btn:hover {
    background: rgba(255, 95, 95, 0.08) !important;
}

/* Stats Summary Box */
.stats-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.6;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 2rem;
}

/* Elite Modal System */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    z-index: 999999;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-content {
    background: #ffffff !important;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    color: #333 !important;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    margin: auto;
    /* Robust centering fallback */
}

.modal-content--login {
    max-width: 400px;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: var(--bg-color);
    color: #fff;
}

.modal-header h2,
.modal-header span {
    font-size: 0.85rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.25rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    background: #ffffff !important;
    color: #333 !important;
}

/* Modal Inner Components */
.modal-content--report {
    max-width: 600px;
}

/* Report Tabs */
.report-tabs {
    display: flex;
    background: #f3f4f6 !important;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.report-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: transparent !important;
    color: #6b7280 !important;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
}

.report-tab.active {
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.report-tab-content {
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.report-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #333 !important;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.report-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: rgba(217, 85, 80, 0.08) !important;
    padding: 1.25rem 1rem;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(217, 85, 80, 0.12);
    color: #333 !important;
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.card-val {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--bg-color);
    line-height: 1.2;
}

.card-label {
    font-size: 0.65rem;
    text-transform: lowercase;
    color: var(--bg-color) !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 2px;
    opacity: 0.8;
}

.chart-period-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.chart-period {
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #f3f4f6 !important;
    color: #333 !important;
    cursor: pointer;
}

.chart-period.active {
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.chart-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #9ca3af !important;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.chart-container {
    height: 150px;
    background: #f8f9fb !important;
    border-radius: 14px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 1rem 0.75rem;
    padding-bottom: 0.5rem;
    border: 1px solid #eef0f2;
}

.chart-day-labels {
    display: flex;
    justify-content: space-around;
    padding: 6px 0.75rem 0;
    font-size: 0.65rem;
    color: #9ca3af !important;
    font-weight: 700;
    text-transform: uppercase;
}

.chart-bar {
    flex: 1;
    background: var(--bg-color);
    opacity: 0.4;
    border-radius: 6px;
    position: relative;
    transition: opacity 0.3s;

}

.settings-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9ca3af !important;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.setting-label {
    font-weight: 600;
    color: #374151 !important;
    font-size: 0.95rem;
}

.setting-input {
    width: 80px;
    padding: 10px;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    background: #f9fafb !important;
    font-size: 1rem;
    color: #333 !important;
    transition: border-color 0.2s;
}

.setting-input:focus {
    border-color: var(--bg-color);
    outline: none;
}

.setting-select {
    padding: 10px 14px;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px;
    background: #f9fafb !important;
    font-weight: 600;
    color: #333 !important;
    transition: border-color 0.2s;
}

.setting-select:focus {
    border-color: var(--bg-color);
    outline: none;
}

/* Sound Select Group */
.sound-select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sound-select-group .setting-select {
    flex: 1;
}

.preview-sound-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 2px solid #e5e7eb !important;
    background: #f9fafb !important;
    color: var(--bg-color) !important;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.preview-sound-btn:hover {
    background: var(--bg-color) !important;
    color: #fff !important;
    border-color: var(--bg-color) !important;
    transform: scale(1.05);
}

/* Volume Slider */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 140px;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-color) 0%, #e5e7eb 100%) !important;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    cursor: pointer;
    border: none;
}

.modal-footer {
    padding: 1.5rem 2.5rem;
    background: #f9fafb !important;
    border-top: 1px solid #f0f0f0;
}

.save-btn {
    width: 100%;
    padding: 1.15rem;
    border-radius: 14px;
    background: var(--color-main, var(--bg-color)) !important;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    filter: brightness(1.08);
}

.save-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Login Modal Styles */
.login-subtitle {
    text-align: center;
    color: #6b7280 !important;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.login-field {
    margin-bottom: 1.25rem;
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb !important;
    border-radius: 14px;
    outline: none;
    font-size: 1rem;
    font-weight: 500;
    color: #333 !important;
    background: #f9fafb !important;
    transition: all 0.2s;
    box-sizing: border-box;
}

.login-input:focus {
    border-color: var(--bg-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(217, 85, 80, 0.1);
}

.login-input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.login-submit-btn {
    width: 100%;
    height: 52px;
    font-size: 1rem !important;
    margin-top: 0.5rem;
}

.login-forgot {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.login-forgot a {
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.login-forgot a:hover {
    opacity: 0.7;
}

/* Utility: Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--theme-transition);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Active Task Title Display */
.session-info {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.task-pomo-progress {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    display: none;
}

.status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.5rem;
    width: 100%;
}

.status-message {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0;
}

.active-task-display {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    width: 100%;
}

#active-task-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    opacity: 0.9;
}

.header-right {
    position: relative;
}

/* Dropdown Premium */
.list-dropdown {
    position: fixed;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    padding: 8px 0;
    display: none;
    z-index: 99999;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.list-dropdown button {
    width: 100%;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #555;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}

.list-dropdown button svg {
    opacity: 0.6;
    color: #777;
}

.list-dropdown button:hover {
    background: #f5f5f5;
    color: #333;
}

.list-dropdown button:hover svg {
    opacity: 1;
}

.list-dropdown .danger-text {
    color: #ff4d4d !important;
}

.list-dropdown .danger-text svg {
    color: #ff4d4d !important;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

/* ==========================================================
   COMPREHENSIVE RESPONSIVE SYSTEM
   Breakpoints: 768px · 600px · 480px · 390px
   NOTE: SVG timer ring scales via CSS container only —
         do NOT change r/cx/cy here (JS circumference is fixed).
   ========================================================== */

/* --- Tablet Portrait (≤768px) --- */
@media (max-width: 768px) {
    .pomodoro-container {
        max-width: 100%;
        padding: 1rem 20px 2rem;
        gap: 1.25rem;
    }

    .pomodoro-card {
        max-height: none;
        padding: 1.25rem;
        gap: 0.75rem;
    }

    .modal-content {
        max-width: 96%;
        border-radius: 20px;
    }

    .modal-content--report {
        max-width: 100%;
    }

    .modal-body {
        max-height: 62vh;
        padding: 1.5rem;
    }

    .modal-footer {
        padding: 1.25rem 1.5rem;
    }

    .modal-header {
        padding: 1.25rem 1.5rem;
    }

    /* Keep timer ring natural on tablet */
    .timer-display-container {
        width: clamp(200px, 40vw, 240px);
        height: clamp(200px, 40vw, 240px);
    }
}

/* --- Large Mobile (≤600px) --- */
@media (max-width: 600px) {

    /* Layout */
    .pomodoro-container {
        padding: 0.75rem 14px 1.5rem;
        gap: 1rem;
    }

    .pomodoro-card {
        max-height: none;
        padding: 1rem 1rem 0.875rem;
        gap: 0.625rem;
        border-radius: 18px;
    }

    /* Mode buttons */
    .pomodoro-modes {
        gap: 0.25rem;
        padding: 4px;
    }

    .mode-btn {
        padding: 6px 11px;
        font-size: 0.8rem;
    }

    /* Timer ring — container-only scale */
    .timer-display-container {
        width: clamp(180px, 54vw, 220px);
        height: clamp(180px, 54vw, 220px);
    }

    .time-label {
        font-size: clamp(48px, 14vw, 72px);
        letter-spacing: -2px;
    }

    /* Status text */
    .status-message {
        font-size: 1rem;
    }

    .session-info {
        font-size: 0.95rem;
    }

    /* Active task */
    .active-task-display {
        margin-top: 0.5rem;
        padding: 0.5rem;
    }

    #active-task-name {
        font-size: 1rem;
    }

    /* Action buttons */
    .action-btn {
        padding: 0 2.75rem;
        height: 52px;
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .skip-btn {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    /* Tasks */
    .task-item {
        padding: 14px 12px;
    }

    .task-title {
        font-size: 0.9rem;
    }

    .task-note-preview {
        font-size: 0.78rem;
    }

    .task-checkbox {
        width: 24px;
        height: 24px;
    }

    .task-count {
        font-size: 0.85rem;
    }

    .add-task-btn {
        padding: 14px;
        font-size: 0.88rem;
    }

    /* Stats bar */
    .stats-summary {
        padding: 1rem 1.25rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-divider {
        margin: 0 1.25rem;
    }

    /* Modals — bottom-sheet style on mobile */
    .modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        border-radius: 24px 24px 16px 16px;
        max-height: 92vh;
    }

    .modal-body {
        max-height: 66vh;
        padding: 1.25rem;
    }

    .modal-header {
        padding: 1.125rem 1.5rem;
    }

    .modal-footer {
        padding: 1rem 1.25rem;
    }

    /* Settings items */
    .setting-label {
        font-size: 0.88rem;
    }

    .setting-input {
        width: 68px;
        padding: 8px;
        font-size: 0.95rem;
    }

    /* Report summary stays 3-col but compact */
    .summary-card {
        padding: 0.75rem 0.5rem;
    }

    .card-val {
        font-size: 1.5rem;
    }

    .card-label {
        font-size: 0.62rem;
    }

    /* Volume slider */
    .volume-slider {
        width: 120px;
    }

    /* Leaderboard — hide tier badge to save space */
    .lb-tier-badge {
        display: none;
    }

    .lb-col-hours {
        width: 52px;
    }

    .lb-col-streak {
        width: 50px;
    }

    .lb-col-name {
        font-size: 0.88rem;
    }
}

/* --- Standard Mobile (≤480px) --- */
@media (max-width: 480px) {
    .pomodoro-container {
        padding: 0.5rem 10px 1.25rem;
    }

    .pomodoro-card {
        padding: 0.875rem;
        border-radius: 14px;
        gap: 0.5rem;
    }

    /* Even tighter mode buttons */
    .mode-btn {
        padding: 5px 9px;
        font-size: 0.76rem;
    }

    /* Timer ring */
    .timer-display-container {
        width: clamp(158px, 56vw, 200px);
        height: clamp(158px, 56vw, 200px);
    }

    .time-label {
        font-size: clamp(42px, 13.5vw, 62px);
        letter-spacing: -1.5px;
    }

    .action-btn {
        padding: 0 2rem;
        height: 50px;
        font-size: 1.1rem;
    }

    .skip-btn {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

    /* Settings — wrap items with long controls */
    .setting-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .sound-select-group {
        width: 100%;
    }

    .sound-select-group .setting-select {
        flex: 1;
        min-width: 0;
    }

    .setting-select {
        width: 100%;
        font-size: 0.88rem;
    }

    .volume-slider {
        width: 100%;
    }

    /* Modal body a touch taller */
    .modal-body {
        max-height: 70vh;
        padding: 1rem;
    }

    /* Compact report */
    .report-summary {
        gap: 0.4rem;
    }

    .card-val {
        font-size: 1.3rem;
    }

    .card-label {
        font-size: 0.58rem;
    }

    /* Status */
    .status-message {
        font-size: 0.9rem;
    }
}

/* --- Extra Small (≤390px — iPhone SE etc.) --- */
@media (max-width: 390px) {
    .pomodoro-container {
        padding: 0.25rem 8px 1rem;
    }

    .pomodoro-card {
        padding: 0.75rem;
        border-radius: 12px;
    }

    .mode-btn {
        padding: 5px 7px;
        font-size: 0.72rem;
    }

    .timer-display-container {
        width: clamp(145px, 58vw, 175px);
        height: clamp(145px, 58vw, 175px);
    }

    .time-label {
        font-size: clamp(38px, 12.5vw, 54px);
        letter-spacing: -1px;
    }

    .action-btn {
        padding: 0 1.5rem;
        height: 46px;
        font-size: 1rem;
        letter-spacing: 0.5px;
    }

    .skip-btn {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .stat-divider {
        margin: 0 0.75rem;
    }

    .modal-body {
        padding: 0.875rem;
    }
}

/* === Leaderboard Styles === */
.modal-content--leaderboard {
    max-width: 500px;
}

.leaderboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.25rem;
    background: #f3f4f6 !important;
    border-radius: 12px;
    padding: 4px;
}

.lb-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: transparent !important;
    color: #6b7280 !important;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
}

.lb-tab.active {
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.leaderboard-header-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #9ca3af !important;
    font-weight: 800;
    letter-spacing: 1px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 4px;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.leaderboard-list::-webkit-scrollbar {
    width: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.15s;
    font-size: 0.9rem;
    color: #333 !important;
}

.lb-row:nth-child(even) {
    background: #f9fafb !important;
}

.lb-row:hover {
    background: #f0f2f5 !important;
}

.lb-row--top {
    font-weight: 700;
}

.lb-row--top:nth-child(1) {
    background: linear-gradient(90deg, #fef3c7 0%, transparent 60%) !important;
}

.lb-row--top:nth-child(2) {
    background: linear-gradient(90deg, #f3f4f6 0%, transparent 60%) !important;
}

.lb-row--top:nth-child(3) {
    background: linear-gradient(90deg, #fed7aa 0%, transparent 60%) !important;
}

.lb-row--you {
    background: linear-gradient(90deg, rgba(217, 85, 80, 0.1) 0%, transparent 60%) !important;
    border: 2px solid var(--bg-color);
    font-weight: 700;
}

.lb-col-rank {
    width: 40px;
    text-align: center;
    font-weight: 800;
    flex-shrink: 0;
}

.lb-col-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 12px;
    overflow: hidden;
}

.lb-col-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.lb-tier-badge {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid currentColor;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}



.lb-col-hours {
    width: 65px;
    text-align: right;
    font-weight: 700;
    color: var(--bg-color) !important;
    flex-shrink: 0;
}

.lb-col-streak {
    width: 60px;
    text-align: right;
    font-weight: 600;
    color: #f59e0b !important;
    flex-shrink: 0;
}

.lb-your-position {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    margin-top: 12px;
    background: var(--bg-color) !important;
    color: #fff !important;
    border-radius: 14px;
    font-size: 0.85rem;
    text-align: left;
}

.lb-your-position span:first-child {
    font-size: 0.95rem;
    font-weight: 700;
}

.lb-your-position strong {
    font-size: 1.25rem;
    margin-left: 4px;
}

.lb-your-position span:last-child {
    opacity: 0.9;
    font-weight: 500;
}

/* Auth & Ranking Gate Enhancements */
.modal-content--auth {
    max-width: 400px !important;
}

.auth-tabs {
    display: flex;
    gap: 1.5rem;
    margin-right: auto;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.auth-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.25s;
    font-family: 'Outfit', sans-serif;
}

.auth-tab.active {
    color: #ffffff;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.auth-form {
    display: none;
    animation: authFadeIn 0.3s ease-out;
}

.auth-form.active {
    display: block;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.auth-msg {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
    animation: shake 0.4s ease;
}

.auth-msg.error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-msg.success {
    display: block;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.auth-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 14px !important;
    font-size: 1rem !important;
    letter-spacing: 1px;
}

/* Ranking Gate Style */
.leaderboard-gate {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gate-content {
    max-width: 340px;
    padding: 2.5rem;
    color: #fff;
    animation: gateSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gate-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
    display: block;
}

.gate-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.gate-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
}

.gate-content .login-btn {
    padding: 0 2.5rem;
    height: 52px;
    font-size: 1rem;
    border-radius: 12px;
    background: #fff;
    color: #333;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gate-content .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gateSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

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

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@media (max-width: 600px) {
    .modal-content--auth {
        width: 92%;
        padding: 1.5rem;
    }

    .gate-content {
        padding: 1.5rem;
    }

    .gate-icon {
        font-size: 3rem;
    }

    .gate-content h3 {
        font-size: 1.4rem;
    }
}

/* Fail-safe: Ensure Redundant Status Labels are Hidden */
#session-number,
#status-msg {
    display: none !important;
}

/* 
   ==========================================================================
   NEW: Main Page SEO Header & App Tour Section
   ==========================================================================
*/

.main-page-header {
    text-align: center;
    margin: 0.5rem auto 0.25rem;
    /* Reduced more for absolute quick start */
    padding: 0 20px;
    color: #fff;
    animation: fadeInDown 0.8s ease;
}

.main-pomo-title {
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    /* Even more compact */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.3rem;
    letter-spacing: -1px;
}

.accent-text {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.main-pomo-subtitle {
    font-size: 1rem;
    /* Slightly smaller */
    opacity: 0.75;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
}

/* App Tour Section */
.app-tour-section {
    margin: var(--section-gap) auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.tour-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.tour-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.tour-description {
    opacity: 0.7;
    margin-bottom: 2rem;
    color: #fff;
}

.tour-showcase {
    margin-bottom: 2.5rem;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.tour-img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.tour-showcase:hover .tour-img {
    transform: scale(1.02);
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    color: #fff;
}

.tour-features-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    text-align: left;
}

.tour-feature {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tour-feature-icon {
    font-size: 1.5rem;
}

.tour-feature h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
}

.tour-feature p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.6;
    color: #fff;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Visibility and Layout */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

@media (max-width: 768px) {
    .tour-features-list {
        grid-template-columns: 1fr;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .app-tour-section {
        margin: var(--section-gap-mobile) 1rem;
    }

    .main-pomo-title {
        font-size: 1.4rem;
        /* Safe for iPhone SE small screens */
    }

    .main-pomo-subtitle {
        font-size: 0.85rem;
        padding: 0 10px;
        line-height: 1.3;
    }

    .tour-title {
        font-size: 1.3rem;
    }
}

/* =====================================================
   DEEP WORK INFO SECTION (Matches Glass Panels)
   ===================================================== */
.pomo-info-section {
    margin: var(--section-gap) auto;
    padding: 3rem 2.5rem;
}

.pomo-info-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pomo-info-text .app-hero-badge {
    margin-bottom: 1.25rem;
}

.pomo-info-text p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.pomo-info-text p:last-child {
    margin-bottom: 0;
}

.pomo-info-text strong {
    color: #fff;
}

.pomo-info-text a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 3px;
    transition: var(--hover-transition);
    font-weight: 600;
}

.pomo-info-text a:hover {
    text-decoration-color: #fff;
}

.pomo-info-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.pomo-info-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.pomo-info-section:hover .pomo-info-image img {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .pomo-info-section {
        margin: var(--section-gap-mobile) 1rem;
        padding: 2rem 1.5rem;
    }
}