:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #10B981;
    --tertiary-color: #F59E0B;
    --background: #F9FAFB;
    --surface: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo {
    width: 36px;
    height: 36px;
    color: var(--primary-color);
}

.language-selector select {
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

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

.main {
    display: grid;
    gap: 30px;
}

.timer-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.timer-display {
    margin-bottom: 40px;
}

.timer-ring {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

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

.timer-time {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.timer-label {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.timer-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 100px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-tertiary {
    background: var(--tertiary-color);
    color: white;
}

.btn-tertiary:hover:not(:disabled) {
    background: #D97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.session-info {
    display: flex;
    justify-content: center;
    gap: 40px;
}

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

.session-stat span:first-child {
    color: var(--text-secondary);
    font-size: 14px;
}

.session-count {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.settings-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.setting-card {
    background: var(--background);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.setting-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.setting-group {
    margin-bottom: 16px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.setting-group input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.setting-group input[type="range"] {
    flex: 1;
    margin: 0 8px;
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

input[type="checkbox"]:checked + .switch {
    background: var(--primary-color);
}

input[type="checkbox"]:checked + .switch::after {
    transform: translateX(20px);
}

input[type="checkbox"] {
    display: none;
}

.tips-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tip-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.tip-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.tip-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tip-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer {
    text-align: center;
    padding: 30px 20px;
    color: white;
    font-size: 14px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    min-width: 300px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 24px;
}

.notification-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .title {
        font-size: 24px;
    }
    
    .timer-section {
        padding: 20px;
    }
    
    .timer-time {
        font-size: 36px;
    }
    
    .timer-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
    }
    
    .session-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #1F2937;
        --surface: #111827;
        --text-primary: #F9FAFB;
        --text-secondary: #9CA3AF;
        --border: #374151;
    }
    
    body {
        background: linear-gradient(135deg, #4338CA 0%, #7C3AED 100%);
    }
    
    .language-selector select {
        background: var(--surface);
        color: var(--text-primary);
    }
    
    .setting-group input[type="number"] {
        background: var(--surface);
        color: var(--text-primary);
    }
    
    .tip-card {
        background: linear-gradient(135deg, #667eea25 0%, #764ba225 100%);
    }
    
    .notification {
        background: var(--surface);
        border: 1px solid var(--border);
    }
}