:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --container-bg: white;
    --shadow: rgba(0, 0, 0, 0.1);
    --table-header-bg: #f8f9fa;
    --border-color: #ddd;
    --button-bg: #007bff;
    --button-hover: #0056b3;
    --button-disabled: #ccc;
    --time-info-color: #666;
}

body.dark {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --container-bg: #1e1e1e;
    --shadow: rgba(0, 0, 0, 0.3);
    --table-header-bg: #2a2a2a;
    --border-color: #444;
    --button-bg: #4a90e2;
    --button-hover: #357abd;
    --button-disabled: #555;
    --time-info-color: #aaa;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--container-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    position: relative;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.theme-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-color);
}

h1, h2 {
    text-align: center;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

fieldset {
    border: 1px solid var(--border-color);
    padding: 10px;
    margin: 0;
}

legend {
    font-weight: bold;
    padding: 0 5px;
}

label {
    font-weight: bold;
    display: inline-block;
    margin-right: 10px;
}

input[type="number"] {
    width: 60px;
    margin-right: 15px;
}

.sec-input {
    width: 70px;
}

input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    background-color: var(--container-bg);
    color: var(--text-color);
    transition: border-color 0.3s;
}

button {
    padding: 12px;
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover:not(:disabled) {
    background-color: var(--button-hover);
}

button:disabled {
    background-color: var(--button-disabled);
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--table-header-bg);
}

#exercise-container {
    text-align: center;
}

#timer {
    font-size: 3em;
    font-weight: bold;
    margin: 20px 0;
}

#phase-title {
    font-size: 1.5em;
}

#round-info {
    font-size: 1.2em;
    margin: 10px 0;
}

#time-info {
    font-size: 0.9em;
    color: var(--time-info-color);
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    input, button {
        font-size: 14px;
    }

    #timer {
        font-size: 2.5em;
    }
}
