@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
}

html {
    height: -webkit-fill-available;
}

body {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    /* mobile viewport bug fix */
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    background-image: url('../images/background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    margin: 0;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

header, main {
    position: relative;
    z-index: 2;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo-img {
    height: 60px;
    width: auto;
    margin-right: 10px;
}

.logo-text {
    font-family: "century-gothic-pro", sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.5rem;
    color: #ffffff;
}

.logo h1 {
    font-size: 1.5rem;
    color: #ffffff;
}

nav {
    display: flex;
    position: relative;
    gap: 15px;
}

.icon-button {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-button:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.7);
}

.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.timer-container {
    text-align: center;
}

.phases {
    position: relative;
    width: 260px;
    height: 60px;
    margin: -30px auto 20px;
}

.phase-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.phase-indicator:nth-child(1) { transform: translate(0, 30px); }
.phase-indicator:nth-child(2) { transform: translate(80px, 12px); }
.phase-indicator:nth-child(3) { transform: translate(160px, 12px); }
.phase-indicator:nth-child(4) { transform: translate(240px, 30px); }

.phase-indicator.completed {
    background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.8));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 1);
}

.phase-indicator.active {
    width: 24px;
    height: 24px;
    z-index: 1;
    border-width: 3px;
}

.phase-indicator.active.work {
    background: linear-gradient(145deg, #FF9E80, #FF7043);
    box-shadow: 
        0 0 20px rgba(255, 112, 67, 0.8),
        0 0 35px rgba(255, 112, 67, 0.6),
        0 0 50px rgba(255, 112, 67, 0.4);
    border-color: #FFD180;
}

.phase-indicator.active.break {
    background: linear-gradient(145deg, #81D4FA, #29B6F6);
    box-shadow: 
        0 0 20px rgba(41, 182, 246, 0.8),
        0 0 35px rgba(41, 182, 246, 0.6),
        0 0 50px rgba(41, 182, 246, 0.4);
    border-color: #B3E5FC;
}

.phase-indicator:not(.active):not(.completed) {
    opacity: 0.5;
}

.phase-indicator.active:nth-child(1) { transform: translate(-2px, 28px); }
.phase-indicator.active:nth-child(2) { transform: translate(78px, 10px); }
.phase-indicator.active:nth-child(3) { transform: translate(158px, 10px); }
.phase-indicator.active:nth-child(4) { transform: translate(238px, 28px); }

#sessionInfo, #timerStatus {
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#sessionInfo {
    font-family: "century-gothic", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 2rem;
    margin-top: -10px;
    margin-bottom: 0.5rem;
    text-transform: none;
    letter-spacing: normal;
}

#timerStatus {
    font-family: "century-gothic", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 3rem;
    margin-bottom: 2rem;
}

#timer {
    font-family: "century-gothic", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#sessionInfo, #timer, #timerStatus {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.control-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.control-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 1);
}

.control-button:active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.3);
}

.control-button .icon {
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 20px 30px; 
    width: 95%;
    max-width: 600px;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.modal-content, 
.modal-content input, 
.modal-content select, 
.modal-content button {
    font-family: 'Inter', sans-serif;
}

.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.settings-section:first-of-type {
    margin-top: 10px;
}

.settings-section {
    font-size: 16px;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 15px;
}

.setting {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}

.setting-left {
    display: flex;
    flex-direction: column;
}

.setting-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.setting-title {
    font-weight: 500;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.setting-description {
    font-size: 14px;
    color: #666;
}

.setting input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.unit {
    width: 60px;
    text-align: left;
    margin-left: 8px;
    font-size: 14px;
    color: #666;
}

.setting:last-child {
    margin-bottom: 0;
}

.setting:last-child .setting-right {
    margin-right: 6px;
}

.toggle-switch {
    appearance: none;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch:checked {
    background-color: #7c3aed;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-switch:checked::before {
    transform: translateX(20px);
}

.setting.toggle {
    align-items: center;
}

.section-separator {
    height: 1px;
    background-color: #e0e0e0;
    margin: 20px 0;
}

.background-options {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    width: 100%;
    position: relative;
    padding: 0 30px;
}

.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 0 10px;
}

.carousel-container {
    display: flex;
    transition: transform 0.3s ease;
}

.background-option {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    margin: 0 5px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.background-option img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.background-option:hover img {
    transform: scale(1.05);
}

.background-option.active img {
    border: 2px solid #7c3aed;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.carousel-arrow img {
    width: 20px;
    height: 20px;
    display: block;
}

.carousel-arrow.left {
    left: 5px;
}

.carousel-arrow.right {
    right: 5px;
}

.carousel-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.carousel-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    gap: 10px;
}

.modal-buttons button {
    font-family: 'Inter', sans-serif;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#resetSettings {
    background-color: #f3f4f6;
    color: #374151;
}

#resetSettings:hover {
    background-color: #e5e7eb;
}

#saveSettings {
    background-color: #7c3aed;
    color: white;
}

#saveSettings:hover {
    background-color: #6d28d9;
}

.modal-buttons button:active {
    transform: translateY(0);
    box-shadow: none;
}

.sound-menu {
    display: none;
    position: absolute;
    padding-top: 30px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background-color: #ffffff;
    color: #333;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1500;
    font-family: 'Inter', sans-serif;
    width: 700px;
}

.sound-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ffffff;
}

.sound-menu h3 {
    font-size: 16px;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 15px;
}

.close-sound-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #666;
    font-size: 24px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1;
}

.close-sound-menu:hover,
.close-sound-menu:focus {
    color: #333;
}

.sound-menu-content {
    display: flex;
    justify-content: space-between;
}

.sound-column {
    width: 48%;
}

.sound-column h3 {
    font-size: 16px;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 15px;
}

.sound-column-divider {
    width: 1px;
    background-color: #e0e0e0;
    margin: 0 15px;
}

.tooltip {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    color: #333;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1500;
    font-family: 'Inter', sans-serif;
    width: auto;
    max-width: 500px;
}

.tooltip-content h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #7c3aed;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ffffff;
}

.close-tooltip {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #666;
    font-size: 24px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1;
}

.close-tooltip:hover,
.close-tooltip:focus {
    color: #333;
}

.tooltip-title {
    font-size: 16px;
    font-weight: 700;
    color: #7c3aed;
    margin-bottom: 10px;
}

.tooltip-content {
    font-size: 14px;
    line-height: 1.4;
    padding: 5px;
}

.tooltip-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 15px;
}

.tooltip-content p {
    margin-bottom: 10px;
}

.tooltip-content ol, .tooltip-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.tooltip-content li {
    margin-bottom: 5px;
}

.tooltip-note {
    font-size: 14px;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
    font-style: italic;
}

.sound-accordion {
    margin-top: 20px;
    font-family: 'Inter', sans-serif;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.main-accordion {
    border-bottom: 1px solid #d1d5db;
}

.main-accordion:last-child {
    border-bottom: none;
}

.main-header {
    background-color: #f3f4f6;
    padding: 12px 15px 12px 40px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
    cursor: pointer;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 18px 18px;
}

.main-header[data-category="static-noises"] {
    background-image: url('../icons/soundwave.svg');
}

.main-header[data-category="ambience"] {
    background-image: url('../icons/leaf.svg');
}

.main-header[data-category="music"] {
    background-image: url('../icons/headphones.svg');
}

.main-header[data-category="soundscapes"] {
    background-image: url('../icons/magic.svg');
}

.main-header[data-category="simple"] {
    background-image: url('../icons/stereo.svg');
}

.main-header[data-category="mechanical"] {
    background-image: url('../icons/cogs.svg');
}

.main-header[data-category="digital"] {
    background-image: url('../icons/circuit.svg');
}

.main-header[data-category="musical"] {
    background-image: url('../icons/guitar.svg');
}

.main-header[data-category="ringtones"] {
    background-image: url('../icons/phone.svg');
}

.main-header:after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234b5563' 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: center;
    background-size: contain;
    transition: transform 0.3s ease;
}

.main-header.active:after {
    transform: rotate(180deg);
}

.main-header.active {
    font-weight: 700;
}

.main-header:hover {
    background-color: #e5e7eb;
}

.main-content {
    padding: 0;
    background-color: #ffffff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.main-content.active {
    max-height: 500px;
}

.accordion-content .sound-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 15px 10px 40px;
    margin: 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #4b5563;
    position: relative;
}

.accordion-content .sound-option::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url('../icons/tab.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-right: 5px;
    flex-shrink: 0;
}

.accordion-content .sound-option:hover {
    background-color: #f3e8ff;
}

.accordion-content .sound-option span {
    flex-grow: 1;
}

.sound-option.selected {
    background-color: rgba(124, 58, 237, 0.1);
    font-weight: bold;
    position: relative;
}

.sound-option.selected::after {
    content: '✓';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c3aed;
}

#spotifyPlayerContainer {
    margin-top: 20px;
    width: 100%;
    margin-bottom: 10px;
}

.spotify-note {
    font-size: 0.8em;
    color: #666;
    text-align: center;
    font-style: italic;
}

footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(3px);
    border-radius: 15px;
    padding: 6px 12px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    width: auto;
    max-width: 90%;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    padding: 3px 10px;
    position: relative;
}

.footer-separator {
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: rgba(255, 255, 255, 1);
    margin: 0 5px;
}

footer:hover {
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

footer a:hover {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

footer a:hover::after {
    width: 70%;
}

#attributionsModal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

#attributionsModal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

#attributionsModal .modal-content {
    background-color: #fefefe;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
}

#attributionsModal .close {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#attributionsModal .close:hover,
#attributionsModal .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#attributionsModal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

#attributionsModal h3 {
    font-size: 16px;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 15px;
}

#attributionsModal ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

#attributionsModal li {
    margin-bottom: 10px;
    line-height: 1.5;
}

#attributionsModal p {
    margin-bottom: 15px;
    line-height: 1.5;
}

#attributionsModal a {
    color: #0066cc;
    text-decoration: none;
}

#attributionsModal a:hover {
    text-decoration: underline;
}

#attributionsModal .modal-content,
#attributionsModal p,
#attributionsModal li,
#attributionsModal a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

#attributionsModal a {
    word-break: break-all;
}

#attributionsModal .modal-content {
    box-sizing: border-box;
}

#privacyPolicyModal .modal-content {
    padding: 30px;
}

#privacyPolicyModal .modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
}

#privacyPolicyContent h3 {
    margin-top: 25px;
    font-size: 16px;
    font-weight: 600;
    color: #7c3aed;
}

#privacyPolicyContent p {
    line-height: 1.6;
    margin-bottom: 15px;
}

#privacyPolicyContent ul {
    margin-bottom: 15px;
}

#privacyPolicyContent li {
    margin-bottom: 10px;
}


*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    .logo {
        height: 50px;
    }

    .logo-img {
        height: 50px;
    }

    .logo-text, .logo h1 {
        font-size: 1.5rem;
    }

    nav {
        gap: 15px;
    }

    .icon-button {
        padding: 10px;
    }

    .icon {
        width: 24px;
        height: 24px;
    }

    #timer {
        font-size: 7rem;
    }

    #sessionInfo {
        font-size: 2rem;
    }

    #timerStatus {
        font-size: 2.5rem;
    }

    .control-button {
        width: 50px;
        height: 50px;
    }

    .control-button .icon {
        width: 24px;
        height: 24px;
    }
    
    .control-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(1.0);
        border-color: rgba(255, 255, 255, .8);
    }
    
    .control-button:active {
        transform: scale(0.95);
        background-color: rgba(255, 255, 255, 0.3);
    }

    .background-option {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .carousel-container {
        touch-action: pan-y;
        user-select: none;
        -webkit-user-drag: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    .sound-menu,
    .tooltip {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 600px;
        max-height: 90vh;
        margin: 0;
        overflow-y: auto;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .sound-menu {
        padding: 20px;
    }

    .tooltip {
        padding: 15px;
        width: 90%;
        max-width: 400px;
    }

    .sound-menu::before,
    .tooltip::before {
        display: none;
    }

    .sound-menu-content {
        flex-direction: column;
    }

    .sound-column {
        width: 100%;
        margin-bottom: 20px;
    }

    .sound-column:last-child {
        margin-bottom: 0;
    }

    .sound-column-divider {
        display: none;
    }

    footer {
        padding: 8px 16px;
        width: auto;
        max-width: 80%;
    }

    .footer-content {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    footer a {
        font-size: 1em;
        padding: 2px 6px;
    }

    .footer-separator {
        margin: 0 5px;
    }

    .modal.active {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px 0;
    }

    .modal-content {
        width: 90%;
        max-width: none;
        overflow-y: auto;
        padding: 15px;
        margin: 20px auto;
    }

    .modal-content, .sound-menu, .tooltip {
        max-height: 85vh;
    }

    .setting {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .setting-right {
        justify-content: flex-start;
    }

    .setting input[type="number"] {
        width: 50px;
    }

    .unit {
        width: auto;
    }

    .background-options {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
    }

    .left-section {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        height: 45px;
    }

    .logo-img {
        height: 45px;
    }

    .logo-text, .logo h1 {
        font-size: 1.4rem;
    }

    nav {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }

    .icon-button {
        padding: 8px;
    }

    .icon {
        width: 22px;
        height: 22px;
    }

    #timer {
        font-size: 5.5rem;
    }

    #sessionInfo {
        font-size: 1.8rem;
    }

    #timerStatus {
        font-size: 2.2rem;
    }

    .control-button {
        width: 45px;
        height: 45px;
    }

    .control-button .icon {
        width: 22px;
        height: 22px;
    }

    .phases {
        width: 220px;
        height: 50px;
    }

    .phase-indicator {
        width: 16px;
        height: 16px;
    }

    .phase-indicator.active {
        width: 20px;
        height: 20px;
    }

    .phase-indicator:nth-child(1) { transform: translate(0, 25px); }
    .phase-indicator:nth-child(2) { transform: translate(70px, 10px); }
    .phase-indicator:nth-child(3) { transform: translate(140px, 10px); }
    .phase-indicator:nth-child(4) { transform: translate(200px, 25px); }

    .phase-indicator.active:nth-child(1) { transform: translate(-2px, 23px); }
    .phase-indicator.active:nth-child(2) { transform: translate(68px, 8px); }
    .phase-indicator.active:nth-child(3) { transform: translate(138px, 8px); }
    .phase-indicator.active:nth-child(4) { transform: translate(198px, 23px); }

    .modal-content {
        padding: 10px;
    }

    .setting-title {
        font-size: 14px;
    }

    .setting-description {
        font-size: 12px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-buttons button {
        width: 100%;
    }

    .sound-menu,
    .tooltip {
        width: 90%;
        padding: 15px;
    }

    .sound-menu h3,
    .tooltip-title {
        font-size: 14px;
    }

    .main-header {
        padding: 10px 15px 10px 35px;
        font-size: 13px;
    }

    .accordion-content .sound-option {
        padding: 8px 15px 8px 35px;
        font-size: 13px;
    }

    footer {
        max-width: 90%;
        padding: 6px 12px;
    }

    footer a {
        font-size: 0.9em;
        padding: 2px 6px;
    }
}

@media (max-width: 375px) {

    header {
        padding: 0.75rem 0.5rem;
        align-items: flex-start;
    }

    .left-section {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding: 5px 10px;
    }

    .logo {
        height: 40px;
    }

    .logo-img {
        height: 40px;
    }

    .logo-text, .logo h1 {
        font-size: 1.2rem;
    }

    nav {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }

    .icon-button {
        padding: 8px;
        margin-right: 0;
    }

    #timer {
        font-size: 5rem;
    }

    #sessionInfo {
        font-size: 1.6rem;
    }

    #timerStatus {
        font-size: 2rem;
    }

    .control-button {
        width: 40px;
        height: 40px;
    }

    .control-button .icon {
        width: 20px;
        height: 20px;
    }

    .phases {
        width: 200px;
        height: 45px;
    }

    .phase-indicator {
        width: 14px;
        height: 14px;
    }

    .phase-indicator.active {
        width: 18px;
        height: 18px;
    }

    .phase-indicator:nth-child(1) { transform: translate(0, 22px); }
    .phase-indicator:nth-child(2) { transform: translate(60px, 8px); }
    .phase-indicator:nth-child(3) { transform: translate(120px, 8px); }
    .phase-indicator:nth-child(4) { transform: translate(180px, 22px); }

    .phase-indicator.active:nth-child(1) { transform: translate(-2px, 20px); }
    .phase-indicator.active:nth-child(2) { transform: translate(58px, 6px); }
    .phase-indicator.active:nth-child(3) { transform: translate(118px, 6px); }
    .phase-indicator.active:nth-child(4) { transform: translate(178px, 20px); }

    footer {
        padding: 4px 8px;
    }

    footer a {
        font-size: 0.8em;
        padding: 2px 4px;
    }
}

@media (max-width: 320px) {
    #timer {
        font-size: 5.5rem;
    }

    #sessionInfo {
        font-size: 1.8rem;
    }

    #timerStatus {
        font-size: 2.2rem;
    }

    .timer-controls {
        gap: 0.75rem;
    }

    .timer-container {
        padding: 10px;
    }

    .control-button {
        width: 40px;
        height: 40px;
    }

    .control-button .icon {
        width: 22px;
        height: 22px;
    }

    .modal-content {
        padding: 5px;
    }

    .setting-title {
        font-size: 12px;
    }

    .setting-description {
        font-size: 10px;
    }

    .sound-menu,
    .tooltip {
        width: 90%;
        padding: 10px;
    }

    .sound-menu h3,
    .tooltip-title {
        font-size: 13px;
    }

    .main-header {
        padding: 8px 12px 8px 30px;
        background-position: 10px center;
        font-size: 12px;
    }

    .accordion-content .sound-option {
        padding: 6px 12px 6px 30px;
        font-size: 12px;
    }

    footer {
        max-width: 95%;
        padding: 3px 6px;
    }

    footer a {
        font-size: 0.75em;
        padding: 1px 4px;
    }

    .footer-separator {
        margin: 0 3px;
    }
}

@media screen and (min-width: 2560px) {
    body {
        font-size: 24px;
    }

    .logo-img {
        height: 90px;
    }

    .icon-button {
        padding: 18px;
    }

    .icon {
        width: 36px;
        height: 36px;
    }

    #timer {
        font-size: 12rem;
    }

    #sessionInfo {
        font-size: 3rem;
    }

    #timerStatus {
        font-size: 4.5rem;
    }

    .phases {
        width: 450px;
        height: 100px;
    }

    .phase-indicator {
        width: 36px;
        height: 36px;
    }

    .phase-indicator.active {
        width: 44px;
        height: 44px;
    }

    .phase-indicator:nth-child(1) { transform: translate(0, 50px); }
    .phase-indicator:nth-child(2) { transform: translate(140px, 20px); }
    .phase-indicator:nth-child(3) { transform: translate(280px, 20px); }
    .phase-indicator:nth-child(4) { transform: translate(420px, 50px); }

    .phase-indicator.active:nth-child(1) { transform: translate(-4px, 46px); }
    .phase-indicator.active:nth-child(2) { transform: translate(136px, 16px); }
    .phase-indicator.active:nth-child(3) { transform: translate(276px, 16px); }
    .phase-indicator.active:nth-child(4) { transform: translate(416px, 46px); }

    .control-button {
        width: 72px;
        height: 72px;
    }

    .control-button .icon {
        width: 36px;
        height: 36px;
    }

    footer {
        font-size: 1.2em;
        padding: 8px 16px;
    }

    .modal-content {
        max-width: 900px;
        padding: 45px;
        border-radius: 30px;
    }

    .modal-content h2,
    .modal-content .settings-section {
        font-size: 36px;
        margin-bottom: 30px;
    }

    .close {
        font-size: 42px;
        top: 20px;
        right: 25px;
    }

    .setting {
        margin-bottom: 36px;
    }

    .setting-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .setting-description {
        font-size: 20px;
    }

    .setting-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .setting input[type="number"] {
        width: 90px;
        padding: 12px;
        font-size: 20px;
        text-align: center;
    }

    .unit {
        width: auto;
        margin-left: 10px;
        font-size: 20px;
    }

    .toggle-switch {
        width: 60px;
        height: 30px;
        border-radius: 15px;
        background-color: #ccc;
        transition: background-color 0.3s ease;
    }

    .toggle-switch:checked {
        background-color: #7c3aed;
    }

    .toggle-switch::before {
        content: '';
        position: absolute;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background-color: white;
        top: 2px;
        left: 2px;
        transition: transform 0.3s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .toggle-switch:checked::before {
        transform: translateX(30px);
    }

    .background-options {
        padding: 0 45px;
    }

    .carousel-arrow {
        padding: 15px;
    }

    .carousel-arrow img {
        width: 30px;
        height: 30px;
    }

    .modal-buttons button {
        padding: 15px 30px;
        font-size: 20px;
    }

    .sound-menu {
        width: 1050px;
    }

    .sound-menu h3 {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .main-header {
        font-size: 22px;
        padding: 18px 24px 18px 60px;
        background-repeat: no-repeat;
        background-position: 15px center;
        background-size: 28px 28px;
    }

    .main-header:after{
        width: 18px;
        height: 18px;
    }

    .accordion-content .sound-option {
        font-size: 20px;
        padding: 15px 24px 15px 60px;
    }

    .close-sound-menu {
        font-size: 36px;
    }

    .tooltip {
        max-width: 750px;
        padding: 30px;
    }

    .tooltip h3.tooltip-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .tooltip-content {
        font-size: 20px;
    }

    .close-tooltip {
        font-size: 36px;
    }

    #attributionsModal .modal-content,
    #privacyPolicyModal .modal-content {
        max-width: 1050px;
    }

    #attributionsModal h2,
    #privacyPolicyModal h2 {
        font-size: 36px;
        margin-bottom: 30px;
    }

    #attributionsModal h3,
    #privacyPolicyContent h3 {
        font-size: 28px;
        margin-bottom: 24px;
    }

    #attributionsModal p,
    #attributionsModal li,
    #privacyPolicyContent p,
    #privacyPolicyContent li {
        font-size: 20px;
        line-height: 1.6;
        margin-bottom: 15px;
    }

    footer a {
        font-size: 0.8em;
        padding: 2px 12px;
    }

    .footer-separator {
        height: 16px;
        margin: 0 8px;
    }
}