@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --bg-color: #e0e5ec; 
    --text-color: #5b6577;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    
    --primary-color: #d64545; 
    --primary-hover: #e06868;
    --focus-color: #2ecc71;     
    --short-break-color: #3498db; 
    --long-break-color: #8e44ad;  
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.5s ease;
}

.container {
    position: relative;
    text-align: center;
    padding: 2.5rem;
    background-color: var(--bg-color);
    border-radius: 30px;
    box-shadow: 
        -10px -10px 20px var(--shadow-light),
        10px 10px 20px var(--shadow-dark);
    width: 90%;
    max-width: 380px;
}

.settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.settings-btn:hover {
    transform: rotate(45deg) scale(1.1);
    opacity: 1;
}

h1 {
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px var(--shadow-light);
}

.timer-card {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 
        inset -8px -8px 15px var(--shadow-light),
        inset 8px 8px 15px var(--shadow-dark);
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.progress-ring__svg {
    transform: rotate(-90deg);
}
.progress-ring__circle,
.progress-ring__circle-bg {
    fill: transparent;
    stroke-width: 10;
}

.progress-ring__circle-bg {
    stroke: transparent; 
}

.progress-ring__circle {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s linear, stroke 0.5s ease;
}

.timer-content {
    z-index: 1;
}

#status-label {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    transition: color 0.5s ease;
}

#timer-display {
    font-size: 4rem;
    font-weight: 300; 
    line-height: 1;
    color: var(--text-color);
}

.focus-mode .progress-ring__circle,
.focus-mode #status-label {
    stroke: var(--focus-color);
    color: var(--focus-color);
}
.short-break-mode .progress-ring__circle,
.short-break-mode #status-label {
    stroke: var(--short-break-color);
    color: var(--short-break-color);
}
.long-break-mode .progress-ring__circle,
.long-break-mode #status-label {
    stroke: var(--long-break-color);
    color: var(--long-break-color);
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.btn {
    cursor: pointer;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--bg-color);
    box-shadow: 
        -5px -5px 10px var(--shadow-light),
        5px 5px 10px var(--shadow-dark);
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn:active {
    box-shadow: 
        inset -5px -5px 10px var(--shadow-light),
        inset 5px 5px 10px var(--shadow-dark);
    transform: translateY(1px);
    color: var(--primary-color);
}

.cycles-container {
    margin-top: 2rem;
    color: #99a5b9;
}
#cycle-counter {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}
.cycle {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #cbd2e0;
    box-shadow: inset 1px 1px 2px var(--shadow-dark), inset -1px -1px 2px var(--shadow-light);
    transition: background-color 0.5s ease;
}
.cycle.completed {
    background-color: var(--focus-color);
}

dialog {
    border-radius: 20px;
    border: none;
    padding: 2rem;
    background: var(--bg-color);
    box-shadow: 
        -10px -10px 20px var(--shadow-light), 
        10px 10px 20px var(--shadow-dark);
    color: var(--text-color);
}

dialog::backdrop {
    background-color: rgba(91, 102, 122, 0.5);
    backdrop-filter: blur(4px);
}

.form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-group label {
    text-align: left;
    font-weight: 600;
}

.form-group input {
    width: 80px;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    text-align: center;
    background: var(--bg-color);
    box-shadow: 
        inset -3px -3px 7px var(--shadow-light), 
        inset 3px 3px 7px var(--shadow-dark);
    color: var(--text-color);
    font-weight: 600;
}
.form-group input:focus {
    outline: none;
    box-shadow: 
        inset -3px -3px 7px var(--shadow-light), 
        inset 3px 3px 7px var(--shadow-dark),
        0 0 0 2px var(--primary-color); 
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions button {
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    background-color: var(--bg-color);
    color: var(--text-color);
    box-shadow: 
        -5px -5px 10px var(--shadow-light),
        5px 5px 10px var(--shadow-dark);
    transition: all 0.2s ease-in-out;
}

.modal-actions button:hover {
    transform: translateY(-2px);
}
.modal-actions button:active {
    box-shadow: 
        inset -5px -5px 10px var(--shadow-light),
        inset 5px 5px 10px var(--shadow-dark);
    transform: translateY(1px);
}

.modal-actions button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
}
.modal-actions button[type="submit"]:hover {
    background-color: var(--primary-hover);
    color: white;
}