html, body {
    background-color: #fff;
    color: #636b6f;
    font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
    height: 100vh;
    margin: 0;
}

h1, h2, a {
    font-weight: normal;    
}

.site-logo {
    display: inline-block;
    max-width: 100%;
    margin: 30px auto;
}

.full-height {
    height: 100vh;
}

.flex-center {
    align-items: center;
    display: flex;
    justify-content: center;
}

.content {
    text-align: center;
}

.row {
    display: flex;
}   

.col {
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
}

.text-clock {
    font-size: var(--clock-font-size);
    color: #F0907A;
    text-align: center;
}

.btn-timer {
    background: transparent;
    border: 0px;
    padding: 10px;
    cursor: pointer;
}

.btn-timer:focus {
    border: 0px;
    outline: none;
}

.timer-title {
    align-items: center; 
    justify-content: center;		
    margin-top: 0;
    font-size: var(--title-font-size);
}

.btn-mode {
    background-color: #F0907A;
    border: none;
    color: white;
    padding: var(--btn-padding);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: var(--btn-font-size);
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.btn-mode.active {
    background-color: #e07a64;
}

.estimated-time {
    font-size: var(--estimated-time-font-size);
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

.header-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.header-button:hover {
    transform: scale(1.1);
}

.header-button img {
    width: 24px;
    height: 24px;
}

/* Hide exit fullscreen icon by default */
.exit-fullscreen-icon {
    display: none;
}

/* Show exit fullscreen icon when in fullscreen mode */
:fullscreen .enter-fullscreen-icon {
    display: none;
}

:fullscreen .exit-fullscreen-icon {
    display: block;
}

.custom-duration {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    background-color: #f8f9f9;
    padding: 20px;
    border-radius: 10px;
}

.custom-duration.show {
    display: flex;
}

.custom-duration label {
    margin-right: 10px;
}

.custom-duration input {
    width: 50px;
    padding: 5px;
    margin-right: 10px;
}

.duration-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.notification {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
}

.notification a {
    color: #0056b3;
    text-decoration: underline;
}

/* Sound Controls */
.sound-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    background-color: #f8f9f9;
    padding: 20px;
    border-radius: 10px;
}

.sound-panel.show {
    display: flex;
}

.sound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 600px;
}

.sound-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.sound-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    margin-bottom: 10px;
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease;
}

.sound-button:hover {
    transform: scale(1.1);
}

.sound-button img {
    width: 100%;
    height: 100%;
    transition: opacity 0.3s;
}

.sound-button .active-img {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
}

.sound-button.active .inactive-img {
    display: none;
}

.sound-button.active .active-img {
    display: block;
}

.slider-container {
    width: 100%;
    padding-top: 5px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #707070;
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #5D6672;
    cursor: pointer;
    margin-top: -6px;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #5D6672;
    cursor: pointer;
}

/* Add to styles.css */
/* Language dropdown styles */
.language-switcher {
    position: relative;
    margin-left: 10px;
}

.language-select {
    appearance: none;
    background: transparent;
    border: 1px solid #636b6f;
    border-radius: 4px;
    color: #636b6f;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 24px 4px 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23636b6f' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.language-select:hover {
    background-color: #f5f5f5;
}

.language-select:focus {
    outline: none;
    border-color: #F0907A;
}

/* Hide the default arrow in IE */
.language-select::-ms-expand {
    display: none;
}


.instructions-section {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.instructions-section h2 {
    color: #636b6f;
    font-size: 22px;
    padding: 15px 0;
    margin: 0;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-weight: normal;
}

.instructions-container {
    padding: 20px 0;
    max-width: 600px;
    margin: 0 auto;
}

.instruction-paragraph {
    color: #636b6f;
    line-height: 1.7;
    margin: 15px 0;
    font-size: 15px;
    text-align: left;
    opacity: 0.9;
}
/* Panels: h2 headings (were h3) keep the panel look */
.panel-title {
    font-size: 18px;
    font-weight: normal;
    margin: 0 0 15px;
}

.control-icon {
    height: var(--control-size);
    width: var(--control-size);
    display: grid;
}

.reset-icon {
    height: var(--reset-size);
    width: var(--reset-size);
    display: grid;
}

.btn-timer:focus-visible,
.btn-mode:focus-visible,
.header-button:focus-visible,
.sound-button:focus-visible {
    outline: 2px solid #F0907A;
    outline-offset: 2px;
}

/* Content below the timer (how to, app, FAQ, more tools) */
.tool-content {
    max-width: 700px;
    margin: 20px auto 40px;
    padding: 0 20px;
    box-sizing: border-box;
}

.tool-section {
    margin: 0 0 36px;
}

.tool-section h2 {
    color: #636b6f;
    font-size: 22px;
    padding: 0 0 12px;
    margin: 0 0 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-weight: normal;
}

.tool-section h3 {
    color: #3f474d;
    font-size: 17px;
    font-weight: 600;
    margin: 22px 0 6px;
}

.tool-section p {
    color: #636b6f;
    line-height: 1.7;
    margin: 12px 0;
    font-size: 15px;
}

.tool-section a {
    color: #b24a35;
}

.tool-cta {
    background: #fdf3f0;
    border-radius: 10px;
    padding: 20px 24px;
}

.tool-cta h2 {
    border-bottom: 0;
    padding-bottom: 0;
    color: #3f474d;
}

.tool-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tool-section a.tool-btn {
    background: #b24a35;
    color: #fff;
    border-radius: 5px;
    padding: 10px 16px;
    font-size: 15px;
    text-decoration: none;
}

.tool-section a.tool-btn:hover {
    background: #963d2b;
}

.tool-section a.tool-btn-secondary {
    background: transparent;
    color: #b24a35;
    border: 1px solid #b24a35;
}

.tool-links {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px 16px;
}

.tool-links a {
    color: #5c6770;
    font-size: 15px;
}

.tool-footer {
    text-align: center;
    padding: 24px 16px 40px;
    font-size: 14px;
    color: #8a9399;
    border-top: 1px solid #eee;
}

.tool-footer a {
    color: #5c6770;
}

@media (max-width: 600px) {
    .header-buttons {
        position: static;
        justify-content: flex-end;
        padding: 12px 12px 0;
    }
    .site-logo {
        margin: 12px auto;
    }
    .timer-title {
        margin-top: 10px;
    }
    .timer-title h1 {
        padding: 0 12px;
        font-size: 1.3em;
        margin: 0.4em 0;
    }
}

/* ?task= from the Eisenhower Matrix: the task this Pomodoro is for */
.current-task {
    text-align: center;
    max-width: 600px;
    margin: 4px auto 0;
    padding: 0 16px;
    font-size: 18px;
    color: #3f474d;
    overflow-wrap: anywhere;
}
.current-task[hidden] {
    display: none;
}

.back-to-tool {
    text-align: center;
    margin: 6px 0 0;
    font-size: 15px;
}
.back-to-tool a {
    color: #b24a35;
}
.back-to-tool[hidden] {
    display: none;
}

/* interval presets in the settings panel */
.preset-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 14px;
    max-width: 420px;
}
.preset-label {
    font-size: 14px;
    margin-right: 2px;
}
.preset-btn {
    border: 1px solid #F0907A;
    background: #fff;
    color: #b24a35;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 14px;
    cursor: pointer;
}
.preset-btn:hover {
    background: #fdf3f0;
}
.preset-btn[aria-pressed="true"] {
    background: #b24a35;
    border-color: #b24a35;
    color: #fff;
}

/* desktop: the clock shrinks with the window so Play stays on screen; panels open over the page */
.clock-ring {
    /* leave room for the logo, title, mode buttons and Play on a 650-768px tall laptop window */
    width: clamp(220px, calc(100vh - 390px), var(--ring));
    height: clamp(220px, calc(100vh - 390px), var(--ring));
}
.has-task .clock-ring {
    width: clamp(220px, calc(100vh - 460px), var(--ring));
    height: clamp(220px, calc(100vh - 460px), var(--ring));
}
.site-logo {
    margin: 18px auto 10px;
}
.preset-label {
    flex-basis: 100%;
    text-align: center;
}
.timer-title h1 {
    font-size: 1.25em;
    margin: 0.35em 0;
}
body {
    position: relative;
}
.custom-duration.show,
.sound-panel.show {
    position: absolute;
    z-index: 20;
    top: 64px;
    right: 20px;
    width: min(440px, calc(100vw - 24px));
    box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
    background-color: #fff;
    border: 1px solid #eceef1;
}
.preset-caption {
    min-height: 1.2em;
    margin: -6px 0 12px;
    font-size: 13px;
    color: #5c6770;
    text-align: center;
}
.timer-status {
    width: 100%;
    min-height: 1.4em;
    margin: 0;
    text-align: center;
    font-size: 15px;
    color: #3f474d;
}
@media (max-width: 600px) {
    .custom-duration.show,
    .sound-panel.show {
        top: 52px;
        left: 12px;
        right: 12px;
        width: auto;
    }
    .preset-btn {
        min-height: 36px;
    }
}

.estimated-time {
    margin: 4px 0 0;
}
@media (max-width: 400px) {
    .preset-row {
        gap: 4px;
    }
    .preset-btn {
        padding: 5px 9px;
    }
}
