:root {
    --primary-color: #ff6347;
    --background-color: #f0f0f0;
    --app-background: #ffffff;
    --text-color: #333;
    --white: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --timer-bg-stroke: #e0e0e0;
    --tick-stroke: #ccc;
    --border-color: #ccc;
}

[data-theme="dark"] {
    --background-color: #121212;
    --app-background: #1e1e1e;
    --text-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --timer-bg-stroke: #333;
    --tick-stroke: #444;
    --border-color: #444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#app {
    background-color: var(--app-background);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
    width: 90%;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

#theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#theme-btn:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.timer-container {
    position: relative;
    margin-bottom: 2rem;
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-background {
    fill: none;
    stroke: var(--timer-bg-stroke);
    stroke-width: 10;
    transition: stroke 0.3s ease;
}

.timer-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.timer-ticks {
    stroke: var(--tick-stroke);
    stroke-width: 1;
    transition: stroke 0.3s ease;
}

.time-left {
    font-size: 3.5rem;
    font-weight: bold;
    fill: var(--text-color);
    transform: rotate(90deg);
    transform-origin: center;
    transition: fill 0.3s ease;
}

.controls {
    margin-bottom: 2rem;
}

.controls button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    margin: 0 0.4rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.controls button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.controls button:active {
    transform: translateY(0);
}

.settings {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings label {
    font-size: 0.9rem;
    font-weight: 500;
}

#color-picker {
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: none;
}

.timer-modes {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.duration-control {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.duration-control label {
    font-size: 0.9rem;
    font-weight: 500;
}

#duration-slider {
    width: 100%;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.contact-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.contact-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 0.9rem;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-btn:hover {
    opacity: 0.9;
}

.comments-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.mode-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

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