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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.2em;
    opacity: 0.95;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.timer-section,
.tasks-section,
.analytics-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #f093fb;
    background: white;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: #fef5ff;
}

.mode-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: transparent;
}

.timer-display {
    text-align: center;
    margin-bottom: 30px;
}

.time {
    font-size: 6em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.session-info {
    font-size: 1.1em;
    color: #666;
}

.timer-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.control-btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.control-btn.primary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.control-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

.control-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.control-btn.secondary:hover {
    background: #e0e0e0;
}

.settings {
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
}

.settings h3 {
    margin-bottom: 15px;
    color: #333;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.setting-item span {
    color: #f5576c;
    font-weight: 700;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f5576c;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f5576c;
    cursor: pointer;
    border: none;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.tasks-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.task-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.task-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: border 0.3s;
}

.task-input input:focus {
    border-color: #f093fb;
}

.task-input button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.task-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    transition: all 0.3s;
}

.task-item:hover {
    background: #f0f0f0;
}

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

.task-item.completed .task-text {
    text-decoration: line-through;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    color: #333;
}

.task-delete {
    padding: 6px 12px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.task-delete:hover {
    background: #ff3838;
}

.analytics-section {
    grid-column: 1 / -1;
}

.analytics-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1em;
    opacity: 0.9;
}

.chart-container {
    margin-bottom: 30px;
}

.chart-container h3 {
    margin-bottom: 15px;
    color: #333;
}

#chart {
    width: 100%;
    height: 250px;
    background: #fafafa;
    border-radius: 8px;
}

.history-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.session-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-date {
    font-weight: 600;
    color: #333;
}

.history-details {
    color: #666;
    font-size: 0.95em;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .time {
        font-size: 4em;
    }

    header h1 {
        font-size: 2em;
    }
}
