/* ==========================================
   POMODORO TIMER
   Dark/Light Hybrid Design System
   ========================================== */

:root {
    --primary: #ef4444;
    --primary-light: #fee2e2;
    --primary-dark: #dc2626;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Container */
.pomo-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Dark Hero */
.pomo-hero {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    padding: 64px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pomo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.1) 0%, transparent 70%);
}

.pomo-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto 48px;
}

.pomo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pomo-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.pomo-subtitle {
    font-size: 18px;
    color: var(--gray-400);
    line-height: 1.7;
    margin: 0;
}

/* Stats */
.pomo-hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.pomo-stat {
    text-align: center;
}

.pomo-stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.pomo-stat-label {
    font-size: 14px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Interface */
.pomo-interface {
    background: var(--white);
    margin: -32px 24px 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 32px;
    position: relative;
    z-index: 2;
}

/* Mode Tabs */
.pomo-modes {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: var(--gray-100);
    padding: 6px;
    border-radius: var(--radius-lg);
}

.pomo-mode {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-500);
}

.pomo-mode:hover {
    color: var(--gray-700);
}

.pomo-mode.active {
    background: var(--white);
    color: var(--gray-900);
    box-shadow: var(--shadow-md);
}

.pomo-mode-icon {
    font-size: 24px;
}

.pomo-mode-name {
    font-size: 13px;
    font-weight: 600;
}

.pomo-mode-time {
    font-size: 11px;
    opacity: 0.7;
}

/* Timer Section */
.pomo-timer-section {
    text-align: center;
    margin-bottom: 32px;
}

/* Circular Timer */
.pomo-timer-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.pomo-circle-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}

.pomo-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pomo-circle-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}

.pomo-circle-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 848;
    stroke-dashoffset: 848;
    transition: stroke-dashoffset 1s linear;
}

.pomo-time-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.pomo-time {
    font-size: 64px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.pomo-time-label {
    font-size: 16px;
    color: var(--gray-500);
    margin-top: 8px;
    font-weight: 500;
}

/* Controls */
.pomo-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pomo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.pomo-btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px -4px var(--primary);
}

.pomo-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -4px var(--primary);
}

.pomo-btn-secondary {
    background: var(--gray-800);
    color: var(--white);
}

.pomo-btn-outline {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.pomo-btn-outline:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.pomo-btn-ghost {
    background: transparent;
    color: var(--gray-500);
}

.pomo-btn-ghost:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

.pomo-btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* Task Section */
.pomo-task-section {
    background: var(--gray-50);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.pomo-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.pomo-task-input-wrap {
    display: flex;
    gap: 12px;
}

.pomo-task-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all 0.2s;
}

.pomo-task-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.pomo-current-task {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background: var(--success-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--success);
}

.pomo-task-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
    text-transform: uppercase;
}

.pomo-task-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
}

.pomo-task-clear {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
}

.pomo-task-clear:hover {
    color: var(--danger);
}

/* Settings */
.pomo-settings {
    border-top: 1px solid var(--gray-200);
    padding-top: 24px;
}

.pomo-settings-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pomo-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.pomo-setting {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pomo-setting label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.pomo-setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-100);
    padding: 8px;
    border-radius: var(--radius);
}

.pomo-setting-control button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

.pomo-setting-control button:hover {
    background: var(--primary);
    color: var(--white);
}

.pomo-setting-control span {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--gray-800);
}

/* Toggle */
.pomo-toggle {
    position: relative;
    width: 48px;
    height: 24px;
}

.pomo-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pomo-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: 0.3s;
}

.pomo-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: var(--shadow);
}

.pomo-toggle input:checked + .pomo-toggle-slider {
    background: var(--primary);
}

.pomo-toggle input:checked + .pomo-toggle-slider::before {
    transform: translateX(24px);
}

/* History */
.pomo-history {
    background: var(--white);
    margin: 24px;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.pomo-history-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 16px;
}

.pomo-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pomo-history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 4px solid var(--success);
}

.pomo-history-time {
    font-size: 14px;
    color: var(--gray-500);
    min-width: 60px;
}

.pomo-history-task {
    flex: 1;
    font-weight: 600;
    color: var(--gray-800);
}

.pomo-history-duration {
    font-size: 14px;
    color: var(--success);
    font-weight: 600;
}

/* Features Section */
.pomo-features-section {
    padding: 80px 24px;
    background: var(--gray-50);
}

.pomo-section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    text-align: center;
    margin: 0 0 48px;
}

.pomo-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pomo-feature {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: transform 0.3s;
}

.pomo-feature:hover {
    transform: translateY(-4px);
}

.pomo-feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.pomo-feature h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 12px;
}

.pomo-feature p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}

/* Steps Section */
.pomo-steps-section {
    padding: 80px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.pomo-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pomo-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.pomo-step-num {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 14px -4px var(--primary);
}

.pomo-step-content h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 8px;
}

.pomo-step-content p {
    font-size: 16px;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
}

/* Content Article */
.pomo-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 24px;
}

.pomo-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 48px 0 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary-light);
}

.pomo-content h2:first-child {
    margin-top: 0;
}

.pomo-content p {
    font-size: 18px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.pomo-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.pomo-list li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 16px;
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.7;
}

.pomo-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    width: 24px;
    height: 24px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Table */
.pomo-table-wrap {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.pomo-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 15px;
}

.pomo-table th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 700;
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid var(--gray-200);
}

.pomo-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}

.pomo-table tr:hover td {
    background: var(--gray-50);
}

/* Tips */
.pomo-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.pomo-tip {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.pomo-tip-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.pomo-tip h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 8px;
}

.pomo-tip p {
    font-size: 15px;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
}

/* Mistakes */
.pomo-mistakes {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.pomo-mistake {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: #fef2f2;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--danger);
}

.pomo-mistake-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.pomo-mistake h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 4px;
}

.pomo-mistake p {
    font-size: 15px;
    color: var(--gray-600);
    margin: 0;
}

/* FAQ */
.pomo-faq {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.pomo-faq-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pomo-faq-item h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
    padding: 20px 24px;
    margin: 0;
    background: var(--gray-50);
    cursor: pointer;
}

.pomo-faq-item p {
    font-size: 16px;
    color: var(--gray-600);
    padding: 20px 24px;
    margin: 0;
    border-top: 1px solid var(--gray-100);
    line-height: 1.7;
}

/* CTA */
.pomo-cta {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    padding: 48px;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: 48px;
}

.pomo-cta h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px;
}

.pomo-cta p {
    font-size: 18px;
    opacity: 0.9;
    margin: 0 0 24px;
    color: var(--white);
}

.pomo-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-xl);
}

.pomo-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.3);
}

/* Fullscreen Mode */
.pomo-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    max-width: none;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
}

.pomo-container.fullscreen .pomo-hero,
.pomo-container.fullscreen .pomo-features-section,
.pomo-container.fullscreen .pomo-steps-section,
.pomo-container.fullscreen .pomo-content {
    display: none;
}

.pomo-container.fullscreen .pomo-interface {
    margin: 0;
    box-shadow: none;
    max-width: 600px;
    width: 100%;
}

/* Toast */
.pomo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pomo-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .pomo-title {
        font-size: 32px;
    }
    
    .pomo-hero-stats {
        gap: 24px;
    }
    
    .pomo-interface {
        margin: -16px 16px 0;
        padding: 24px;
    }
    
    .pomo-circle-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .pomo-time {
        font-size: 48px;
    }
    
    .pomo-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .pomo-btn {
        width: 100%;
        justify-content: center;
    }
    
    .pomo-task-input-wrap {
        flex-direction: column;
    }
    
    .pomo-settings-grid {
        grid-template-columns: 1fr;
    }
}