* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --background: #f7fafc;
    --surface: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #1a202c;
        --surface: #2d3748;
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-muted: #a0aec0;
        --border-color: #4a5568;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eye-icon {
    font-size: 3rem;
    animation: blink 4s infinite;
}

@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.timer-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.timer-circle {
    position: relative;
    width: 260px;
    height: 260px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.5s ease;
}

.timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-display {
    font-size: 3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.timer-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary.paused {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background);
}

.info-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.rule-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.rule-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 0.75rem;
    transition: var(--transition);
}

.rule-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.rule-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rule-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.rule-description {
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
}

.settings {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.settings h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    color: var(--text-primary);
    font-weight: 500;
}

input[type="checkbox"] {
    width: 3rem;
    height: 1.5rem;
    appearance: none;
    background: var(--border-color);
    border-radius: 1rem;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: white;
    top: 0.125rem;
    left: 0.125rem;
    transition: var(--transition);
}

input[type="checkbox"]:checked::before {
    transform: translateX(1.5rem);
}

select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--background);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

select:hover {
    border-color: var(--primary-color);
}

.break-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.break-modal.active {
    opacity: 1;
    visibility: visible;
}

.break-content {
    background: var(--surface);
    padding: 3rem;
    border-radius: 1.5rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.break-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.break-content h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.break-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.break-timer {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.break-progress {
    width: 100%;
    height: 0.5rem;
    background: var(--border-color);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.break-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 1s linear;
}

.btn-skip {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-skip:hover {
    background: var(--background);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .eye-icon {
        font-size: 2.5rem;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .rule-cards {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}