:root {
    --primary-color: #4A5568;
    --secondary-color: #718096;
    --accent-color: #D69E2E;
    --bg-color: #F7FAFC;
    --text-color: #2D3748;
    --light-gray: #E2E8F0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

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

.title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 300;
}

.bell-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 3rem;
}

.bell {
    width: 100%;
    height: 100%;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
}

.bell:hover {
    transform: scale(1.05);
}

.bell.ringing {
    animation: ring 0.5s ease-in-out;
    color: var(--accent-color);
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(5deg); }
    20%, 40%, 60%, 80% { transform: rotate(-5deg); }
}

.ripples {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ripple {
    position: absolute;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    animation: ripple-animation 2s ease-out;
}

@keyframes ripple-animation {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        transform: translate(-150px, -150px);
    }
}

.timer-display {
    font-size: 4rem;
    font-weight: 200;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.controls {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.duration-selector,
.interval-selector {
    margin-bottom: 1.5rem;
}

label {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

select, input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background-color: white;
    font-size: 1rem;
    transition: var(--transition);
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.1);
}

#customDuration {
    margin-top: 0.5rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary:hover {
    background-color: #2D3748;
}

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

.btn-secondary:hover {
    background-color: #4A5568;
}

.btn-danger {
    background-color: #E53E3E;
    color: white;
}

.btn-danger:hover {
    background-color: #C53030;
}

.btn-outline {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#volume {
    flex: 1;
}

#volumeValue {
    min-width: 50px;
    text-align: right;
    color: var(--secondary-color);
}

.bell-test {
    text-align: center;
}

.presets {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.presets h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.preset-btn {
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background-color: white;
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.preset-btn:hover {
    background-color: var(--bg-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.stats {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.stats h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--secondary-color);
}

.stat-value {
    font-weight: 500;
    color: var(--primary-color);
}

footer {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.copyright {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .timer-display {
        font-size: 3rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1A202C;
        --text-color: #E2E8F0;
        --light-gray: #4A5568;
    }
    
    body {
        background-color: var(--bg-color);
    }
    
    .controls,
    .presets,
    .stats {
        background-color: #2D3748;
    }
    
    select,
    input[type="number"],
    .preset-btn {
        background-color: #2D3748;
        color: var(--text-color);
        border-color: var(--light-gray);
    }
    
    .btn-outline {
        background-color: transparent;
        color: var(--light-gray);
        border-color: var(--light-gray);
    }
    
    .btn-outline:hover {
        background-color: var(--light-gray);
        color: white;
    }
}