.container {
    background-color: var(--md-sys-color-mode-surface-container-lowest);
    border-radius: 28px;
    padding: 28px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    position: relative;
    transition: background-color 0.5s ease;
    margin: 0 auto;
}

.header {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    color: var(--md-sys-color-mode-primary);
    font-size: 28px;
    margin: 0;
    transition: color 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

h1 md-icon {
    vertical-align: middle;
}

.icon-group {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    transform: translateY(2px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-group--shifted {
    transform: translateX(30px) translateY(2px);
}

.theme-toggle,
.settings-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 10px;
    line-height: 1;
    transition: transform 0.2s, color 0.5s ease;
}

.mode-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 0;
}

.mode-buttons md-filled-button {
    flex: 1;
    margin: 0;
    padding: 12px;
	font-weight: normal;
    border-radius: 18px;
    transition: all 0.5s ease;
    --md-filled-button-container-color: var(--md-sys-color-mode-primary-container);
    --md-filled-button-label-text-color: var(--md-sys-color-mode-on-surface);
    --md-filled-button-hover-label-text-color: var(--md-sys-color-mode-on-surface);
    --md-filled-button-pressed-label-text-color: var(--md-sys-color-mode-on-surface);
    --md-filled-button-hover-state-layer-color: var(--md-sys-color-mode-primary-container);
    --md-filled-button-pressed-state-layer-color: var(--md-sys-color-mode-primary-container);
    --md-filled-button-focus-state-layer-color: var(--md-sys-color-mode-primary-container);
}

.mode-buttons md-filled-button:nth-child(1) {
    border-radius: 18px 0 0 18px;
}

.mode-buttons md-filled-button:nth-child(2) {
    border-radius: 0;
}

.mode-buttons md-filled-button:nth-child(3) {
    border-radius: 0 18px 18px 0;
}

.mode-buttons md-filled-button.active {
    --md-filled-button-container-color: var(--md-sys-color-mode-primary);
    --md-filled-button-label-text-color: var(--md-sys-color-mode-on-primary);
    --md-filled-button-hover-label-text-color: var(--md-sys-color-mode-on-primary);
    --md-filled-button-pressed-label-text-color: var(--md-sys-color-mode-on-primary);
    --md-filled-button-hover-state-layer-color: var(--md-sys-color-mode-inverse-primary);
    --md-filled-button-pressed-state-layer-color: var(--md-sys-color-mode-inverse-primary);
    --md-filled-button-focus-state-layer-color: var(--md-sys-color-mode-inverse-primary);
}

.timer-display {
    font-size: 6.5rem;
    font-weight: bold;
    margin: 28px 0;
    color: var(--md-sys-color-mode-secondary);
    transition: color 0.5s ease;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 28px;
    -webkit-tap-highlight-color: transparent;
}

.controls button {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#start-pause-btn {
    background-color: var(--md-sys-color-mode-primary);
    color: var(--md-sys-color-mode-on-primary);
}

#start-pause-btn md-icon {
    font-size: 36px;
    color: var(--md-sys-color-mode-primary-container);
    transition: color 0.5s ease;
}

#start-pause-btn.paused {
    background-color: var(--md-sys-color-mode-primary);
    color: var(--md-sys-color-mode-on-primary);
    border-radius: 50%;
}

#start-pause-btn.resumed {
    border-radius: 20px;
}

#reset-btn {
    background-color: var(--md-sys-color-mode-tertiary);
    color: var(--md-sys-color-mode-on-primary);
}

#reset-btn md-icon {
    font-size: 36px;
    color: var(--md-sys-color-mode-tertiary-container);
    transition: color 0.5s ease;
}

#reset-btn.pressed {
    border-radius: 50%;
}

#theme-toggle md-icon,
#settings-btn md-icon {
    color: var(--md-sys-color-mode-primary);
    transition: color 0.5s ease;
}

md-dialog {
    --md-dialog-container-color: var(--md-sys-color-mode-secondary-container);
    --md-dialog-headline-color: var(--md-sys-color-mode-on-surface);
    --md-dialog-supporting-text-color: var(--md-sys-color-mode-on-surface);
    width: 92%;
    max-width: 400px;
    margin: auto;
    transition: background-color 0.5s ease, color 0.5s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--md-sys-color-mode-secondary) transparent;
    --md-divider-color: var(--md-sys-color-mode-inverse-primary);
}

md-dialog:not([open]) {
    display: none;
}

md-dialog[open] div[slot="headline"] {
    margin: 16px;
    transition: color 0.5s ease;
    font-size: 1.25rem;
}

md-dialog h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--md-sys-color-mode-primary);
    margin: 16px 12px;
    transition: color 0.5s ease;
}

md-dialog p {
    margin-left: 12px;
    align-items: center;
    display: flex;
    margin-bottom: 12px;
    color: var(--md-sys-color-mode-on-surface);
    transition: color 0.5s ease;
    font-size: 0.875rem;
}

.dialog-image {
    width: 100%;
    max-width: 650px;
    height: auto;
    padding: 20px;
}

md-text-button {
    margin-right: 16px;
    margin-bottom: 12px;
    --md-text-button-label-text-color: var(--md-sys-color-mode-primary);
    --md-text-button-hover-label-text-color: var(--md-sys-color-mode-primary);
    --md-text-button-pressed-label-text-color: var(--md-sys-color-mode-primary);
    --md-text-button-focus-label-text-color: var(--md-sys-color-mode-primary);
    --md-text-button-hover-state-layer-color: var(--md-sys-color-mode-primary);
    --md-text-button-pressed-state-layer-color: var(--md-sys-color-mode-primary);
    --md-text-button-focus-state-layer-color: var(--md-sys-color-mode-primary);
    transition: background-color 0.5s ease, color 0.5s ease, opacity 0.5s ease;
}

.setting-group {
    margin: 16px 20px;
    text-align: left;
}

.setting-group md-outlined-text-field {
    width: 100%;
    --md-outlined-text-field-container-color: var(--md-sys-color-mode-surface);
    --md-outlined-text-field-input-text-color: var(--md-sys-color-mode-on-surface);
    --md-outlined-text-field-hover-input-text-color: var(--md-sys-color-mode-on-surface);
    --md-outlined-text-field-focus-input-text-color: var(--md-sys-color-mode-on-surface);
    --md-outlined-text-field-label-text-color: var(--md-sys-color-mode-on-surface);
    --md-outlined-text-field-hover-label-text-color: var(--md-sys-color-mode-on-surface);
    --md-outlined-text-field-focus-outline-color: var(--md-sys-color-mode-primary);
    --md-outlined-text-field-hover-outline-color: var(--md-sys-color-mode-on-surface);
    --md-outlined-text-field-focus-label-text-color: var(--md-sys-color-mode-primary);
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

.setting-group md-checkbox {
    margin-right: 12px;
    --md-checkbox-outline-color: var(--md-sys-color-mode-on-surface);
    --md-checkbox-hover-outline-color: var(--md-sys-color-mode-on-surface);
    --md-checkbox-focus-outline-color: var(--md-sys-color-mode-on-surface);
    --md-checkbox-selected-container-color: var(--md-sys-color-mode-primary);
    --md-checkbox-selected-hover-container-color: var(--md-sys-color-mode-primary);
    --md-checkbox-selected-pressed-container-color: var(--md-sys-color-mode-primary);
    --md-checkbox-selected-focus-container-color: var(--md-sys-color-mode-primary);
    --md-checkbox-selected-hover-icon-color: var(--md-sys-color-mode-on-primary);
    --md-checkbox-selected-icon-color: var(--md-sys-color-mode-on-primary);
    --md-checkbox-selected-pressed-icon-color: var(--md-sys-color-mode-on-primary);
    --md-checkbox-selected-focus-icon-color: var(--md-sys-color-mode-on-primary);
    transition: background-color 0.5s ease, color 0.5s ease;
}

#stats-btn {
    --md-filled-button-container-color: var(--md-sys-color-mode-primary);
    --md-filled-button-label-text-color: var(--md-sys-color-mode-on-primary);
    --md-filled-button-hover-label-text-color: var(--md-sys-color-mode-on-primary);
    --md-filled-button-pressed-label-text-color: var(--md-sys-color-mode-on-primary);
    --md-filled-button-focus-label-text-color: var(--md-sys-color-mode-on-primary);
    --md-filled-button-hover-state-layer-color: var(--md-sys-color-mode-inverse-primary);
    --md-filled-button-pressed-state-layer-color: var(--md-sys-color-mode-inverse-primary);
    --md-filled-button-focus-state-layer-color: var(--md-sys-color-mode-inverse-primary);
	font-weight: normal;
    padding: 12px 16px;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.stats-group p span {
    margin-left: 6px;
    transition: color 0.5s ease;
}

md-dialog form[slot="content"] {
    overflow-y: auto;
}

.stats-group {
    margin: 12px;
}

.shape-wrapper {
    z-index: -2;
}

.shape-top-right {
    position: fixed;
    top: -80px;
    right: -60px;
    width: 300px;
    height: auto;
    z-index: -1;
    transition: all 0.2s ease;
}

.shape-bottom-left {
    position: fixed;
    transform: rotate(-15deg);
    bottom: -160px;
    left: -45px;
    width: 360px;
    height: auto;
    z-index: -1;
    transition: all 0.2s ease;
}

.shape-top-left {
    position: fixed;
    transform: rotate(300deg);
    top: -175px;
    left: -170px;
    width: 520px;
    height: auto;
    z-index: -1;
    transition: all 0.2s ease;
}

.shape-bottom-right {
    position: fixed;
    bottom: -270px;
    transform: rotate(10deg);
    right: 50px;
    width: 400px;
    height: auto;
    z-index: -1;
    transition: all 0.2s ease;
}

.copyright {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    color: var(--md-sys-color-mode-on-surface);
    transition: color 0.5s ease;
    z-index: 1;
    padding: 0 12px;
}

.copyright a {
    text-decoration: none;
    color: var(--md-sys-color-mode-primary);
    transition: color 0.5s ease;
}

.copyright md-icon {
    font-size: 16px;
    vertical-align: middle;
    color: var(--md-sys-color-mode-primary);
    transition: color 0.5s ease;
}