/* Imports and Variables */
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

:root {
    --light-size: 120px;
    --color-dark-green: #001a00;
    --color-bright-green: #00cc00;
    --color-yellow: #ffcc00;
    --color-red: #ff0000;
    --color-red-dark: #660000;
    --color-white: #ffffff;
    --color-black-75: rgba(0, 0, 0, 0.75);
    --color-white-20: rgba(255, 255, 255, 0.2);
    --color-white-30: rgba(255, 255, 255, 0.3);
}

/* Base styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #003300;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Material Icons */
.material-icons {
    font-size: 48px;
}

/* Timer Styles */
.tm-timer-container {
    position: fixed;
    z-index: 1000;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    max-width: 95vw;
    display: flex;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
}

/* Center position */
.tm-timer-container.tm-pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Corner positions - adjusted for panel clearance */
.tm-timer-container.tm-pos-top-left {
    top: 110px;
    left: 20px;
    transform: none;
    width: auto;
    text-align: left;
    justify-content: flex-start;
}

.tm-timer-container.tm-pos-top-right {
    top: 110px;
    right: 20px;
    transform: none;
    width: auto;
    text-align: right;
    justify-content: flex-end;
}

.tm-timer-container.tm-pos-bottom-left {
    bottom: 10px;
    left: 20px;
    transform: none;
    width: auto;
    text-align: left;
    justify-content: flex-start;
}

.tm-timer-container.tm-pos-bottom-right {
    bottom: 10px;
    right: 20px;
    transform: none;
    width: auto;
    text-align: right;
    justify-content: flex-end;
}

/* Timer Display */
.tm-timer-display {
    font-weight: bold;
    font-family: 'Geist Mono', monospace;
    color: rgba(0, 0, 0, 0.75);
    margin: 0;
    padding: 0;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    width: auto;
    display: inline-block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Only show glow effect on dark background */
.tm-timer-container.tm-on-dark .tm-timer-display {
    text-shadow: 
        0 0 40px rgba(0, 255, 0, 0.7),
        0 0 30px rgba(0, 255, 0, 0.6),
        0 0 20px rgba(0, 255, 0, 0.5),
        0 0 10px rgba(0, 255, 0, 0.4);
}

/* Timer sizes - adjust based on number of visible digits */
.tm-timer-container.tm-pos-center .tm-timer-display {
    font-size: min(31vw, 24.2rem);
    line-height: 1;
}

/* Adjust size based on format length */
.tm-timer-container.tm-pos-center .tm-timer-display.format-shortest {
    font-size: min(50vw, 45rem);  /* Largest for :SS format */
}

.tm-timer-container.tm-pos-center .tm-timer-display.format-short {
    font-size: min(45vw, 40rem);  /* Large for M:SS format */
}

.tm-timer-container.tm-pos-center .tm-timer-display.format-medium {
    font-size: min(33vw, 27.5rem);  /* Medium for MM:SS format */
}

.tm-timer-container.tm-pos-center .tm-timer-display.format-long {
    font-size: min(25.3vw, 22rem);  /* For H:MM:SS format */
}

.tm-timer-container.tm-pos-center .tm-timer-display.format-verylong {
    font-size: min(22vw, 19.8rem);  /* For HH:MM:SS format */
}

/* Corner position base font size */
.tm-timer-container.tm-pos-top-left .tm-timer-display,
.tm-timer-container.tm-pos-top-right .tm-timer-display,
.tm-timer-container.tm-pos-bottom-left .tm-timer-display,
.tm-timer-container.tm-pos-bottom-right .tm-timer-display {
    font-size: min(13vw, 9rem);
}

/* Corner position format adjustments */
.tm-timer-container.tm-pos-top-left .tm-timer-display.format-shortest,
.tm-timer-container.tm-pos-top-right .tm-timer-display.format-shortest,
.tm-timer-container.tm-pos-bottom-left .tm-timer-display.format-shortest,
.tm-timer-container.tm-pos-bottom-right .tm-timer-display.format-shortest {
    font-size: min(17vw, 12rem);
}

.tm-timer-container.tm-pos-top-left .tm-timer-display.format-short,
.tm-timer-container.tm-pos-top-right .tm-timer-display.format-short,
.tm-timer-container.tm-pos-bottom-left .tm-timer-display.format-short,
.tm-timer-container.tm-pos-bottom-right .tm-timer-display.format-short {
    font-size: min(15vw, 10rem);
}

.tm-timer-container.tm-pos-top-left .tm-timer-display.format-medium,
.tm-timer-container.tm-pos-top-right .tm-timer-display.format-medium,
.tm-timer-container.tm-pos-bottom-left .tm-timer-display.format-medium,
.tm-timer-container.tm-pos-bottom-right .tm-timer-display.format-medium {
    font-size: min(13vw, 9rem);
}

.tm-timer-container.tm-pos-top-left .tm-timer-display.format-long,
.tm-timer-container.tm-pos-top-right .tm-timer-display.format-long,
.tm-timer-container.tm-pos-bottom-left .tm-timer-display.format-long,
.tm-timer-container.tm-pos-bottom-right .tm-timer-display.format-long {
    font-size: min(11vw, 7.5rem);
}

.tm-timer-container.tm-pos-top-left .tm-timer-display.format-verylong,
.tm-timer-container.tm-pos-top-right .tm-timer-display.format-verylong,
.tm-timer-container.tm-pos-bottom-left .tm-timer-display.format-verylong,
.tm-timer-container.tm-pos-bottom-right .tm-timer-display.format-verylong {
    font-size: min(10vw, 7rem);
}

/* Timer digits container */
.tm-timer-digits {
    display: inline-block;
    white-space: pre;
    margin: 0;
    padding: 0;
    letter-spacing: 0;
}

/* Colon spacing */
.tm-colon {
    display: inline-block;
    width: 0.6em;
    text-align: center;
    margin: 0 -0.2em;
    vertical-align: baseline;
    transform: translateY(-0.05em);  /* Raise colons slightly */
}

/* Container and Lights */
.tm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.tm-lights {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.tm-light {
    width: var(--light-size);
    height: var(--light-size);
    border-radius: 50%;
    border: 4px solid #333;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.tm-light.tm-active {
    opacity: 1;
}

.tm-light.tm-flash {
    animation: tm-flash 1s infinite;
}

.tm-light.tm-green {
    background-color: #4CAF50;
    box-shadow: 0 0 30px #4CAF50;
}

.tm-light.tm-yellow {
    background-color: #FFC107;
    box-shadow: 0 0 30px #FFC107;
}

.tm-light.tm-red {
    background-color: #F44336;
    box-shadow: 0 0 30px #F44336;
}

/* Controls */
.tm-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tm-buttons {
    display: flex;
    gap: 1rem;
}

/* Animations */
@keyframes flashBg {
    0%, 100% { background-color: var(--color-red); }
    50% { background-color: var(--color-red-dark); }
}

body.flash {
    animation: flashBg 1s infinite;
}

body.red-bg.flash {
    animation: flashBg 1s infinite !important;
    animation-timing-function: ease-in-out !important;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    width: 100%;
    padding: 40px 20px;
    margin: 20px 0;
}

.timeline {
    height: 20px;
    background: var(--color-dark-green);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.segment {
    position: absolute;
    height: 100%;
    transition: left 0.1s, width 0.1s;
}

/* Timeline Segments */
.dark-green {
    background: var(--color-dark-green);
    left: 0;
}

.bright-green {
    background: var(--color-bright-green);
}

.yellow {
    background: var(--color-yellow);
}

.red {
    background: var(--color-red);
}

.striped-red {
    background: repeating-linear-gradient(
        45deg,
        var(--color-red),
        var(--color-red) 10px,
        #ff6666 10px,
        #ff6666 20px
    );
}

/* Timeline Controls */
.slider {
    position: absolute;
    width: 20px;
    height: 40px;
    margin: 0;
    cursor: pointer;
}

.upper-sliders {
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 40px;
}

.lower-sliders {
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 40px;
}

.time-display {
    position: absolute;
    top: -25px;
    transform: translateX(-50%);
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.8);
    display: none;
}

/* Background States */
.tm-app-container.tm-bg--green {
    background-color: var(--color-bright-green);
}

.tm-app-container.tm-bg--yellow {
    background-color: var(--color-yellow);
}

.tm-app-container.tm-bg--red {
    background-color: var(--color-red);
}

.tm-app-container.tm-flash {
    animation: flashBg 1s infinite ease-in-out;
}

.tm-app-container.tm-bg--red.tm-flash {
    animation: flashBg 1s infinite ease-in-out !important;
}

/* Input Styles */
.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1.2rem;
}

.duration-inputs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Modal Styles */
.tm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 0 3%;  /* This creates the side margins */
}

.tm-modal.tm-visible {
    opacity: 1;
    visibility: visible;
}

.tm-modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 100px auto 0;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    color: var(--color-white);
}

/* Help modal specific styles */
#help-overlay {
    align-items: center;
}

#help-overlay .tm-modal-content {
    margin-top: 0;
    max-height: 90vh;
}

/* Mobile styles for modals */
@media (max-width: 480px) {
    .tm-modal {
        align-items: flex-start;
    }
    
    .tm-modal-content {
        margin-top: 100px; /* Space for the icon panel */
        max-height: calc(100vh - 100px); /* Adjust for the top margin */
    }
    
    /* Help modal can stay centered as it's shorter */
    #help-overlay {
        align-items: center;
    }
    
    #help-overlay .tm-modal-content {
        margin-top: 0;
        max-height: 90vh;
    }
}

/* Speakipedia Modal specific styles */
#speakipedia-modal .tm-modal-content {
    background: white !important;
    backdrop-filter: none;
}

#speakipedia-modal .tm-close-button {
    color: #000000;
    right: 0.5rem;
    top: 0.5rem;
}

#speakipedia-modal .tm-close-button:hover {
    opacity: 0.7;
}

/* Help Overlay specific styles */
.tm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tm-overlay.tm-visible {
    opacity: 1;
    visibility: visible;
}

.tm-overlay-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

/* Close button styles */
.tm-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.tm-close-button:hover {
    opacity: 1;
}

/* Button Styles */
.tm-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: var(--color-black-75);
}

.tm-button:hover {
    background: #e0e0e0;
}

.tm-button:active {
    transform: translateY(1px);
}

.tm-button--primary {
    background: #4CAF50;
    color: var(--color-white);
}

.tm-button--primary:hover {
    background: #45a049;
}

/* Remove focus outline from buttons */
.tm-reset-button:focus,
.tm-start-button:focus,
.tm-pause-button:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background-color: transparent !important;
}

/* Ensure reset button background stays transparent */
.tm-reset-button {
    background: transparent !important;
}

/* Settings Styles */
.tm-settings-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-white);
    margin: 0 0 2rem 0;
    padding: 0;
}

/* Screen Preview */
.tm-screen-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(145deg, 
        rgba(20, 20, 20, 0.95),  
        rgba(20, 20, 20, 0.95));
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    margin: 1rem 0;  
    overflow: hidden;  
}

.tm-screen-preview .tm-clock {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    padding: 5px;
    margin: 2px;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Timer visibility toggle styles */
.tm-timer-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: -30px 0 15px 0;
}

.tm-timer-toggle-label {
    font-size: 9px;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 14px;
}

.tm-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(128, 128, 128, 0.8);
    transition: .3s;
    border-radius: 14px;
}

input:checked + .tm-toggle-slider {
    background-color: rgba(0, 190, 0, 0.8);
}

.tm-toggle-slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 2px;
    bottom: 2px;
    background-color: var(--color-white);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .tm-toggle-slider:before {
    transform: translateX(12px);
}

/* Timer hidden class */
.tm-timer-hidden {
    display: none !important;
}

/* Clock Display */
.tm-clock {
    position: absolute;
    font-family: 'Geist Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    color: rgba(0, 255, 0, 0.3);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
    opacity: 0.3;
}

.tm-clock.tm-selected {
    opacity: 1;
}

.tm-clock.tm-corner {
    font-size: 2rem;
}

.tm-clock.tm-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6rem;
}

.tm-top-left {
    top: 0.5rem;
    left: 0.5rem;
}

.tm-top-right {
    top: 0.5rem;
    right: 0.5rem;
}

.tm-bottom-left {
    bottom: 0.5rem;
    left: 0.5rem;
}

.tm-bottom-right {
    bottom: 0.5rem;
    right: 0.5rem;
}

/* Toggle Icon */
.tm-toggle-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.tm-color-strip {
    flex: 1;
    height: 100%;
}

/* Chroma state */
#background-toggle.tm-chroma {
    background: #00ff00;
}

#background-toggle.tm-chroma .tm-toggle-icon {
    opacity: 0;
}

/* Preview clock */
.tm-preview-clock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Geist Mono', monospace;
    font-weight: bold;
    font-size: 6rem;
    color: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .tm-settings-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .tm-settings-section {
        gap: 1.5rem;
    }

    .tm-settings-explanation {
        padding-top: 0.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 600px) {
    .tm-clock {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }
    
    .tm-settings-title {
        font-size: 1rem;
    }
}

/* Duration Display */
.tm-duration-display {
    opacity: 0;
    transition: none;
    position: absolute;
    bottom: 70px;
    left: 0;
    right: 0;
    font-family: 'Geist Mono', monospace;
    font-size: 2.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    text-transform: uppercase;
    pointer-events: none;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .tm-duration-display {
        font-size: 1.6rem;
    }
}

.tm-duration-display.show {
    opacity: 0.5;
    transition: none;
}

.tm-duration-display.fade-out {
    opacity: 0;
    transition: opacity 2s ease-out;
}

.tm-duration-display .label {
    color: rgba(255, 255, 255, 0.8);
}

.tm-duration-display .min-time {
    color: #0f0;
}

.tm-duration-display .warning-time {
    color: #ff0;
}

.tm-duration-display .max-time {
    color: #f00;
}

@keyframes fadeOut {
    0% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
    }
}

/* Base flash class */
.tm-flash {
    animation: flashBg 1s infinite ease-in-out;
}

/* Ensure flash works with background class */
.tm-bg--red.tm-flash {
    animation: flashBg 1s infinite ease-in-out !important;
}

/* Main Container */
.tm-app-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #001a00;
    transition: background-color 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tm-app-container.tm-chroma {
    background-color: #00ff00;
}

/* Optional: Update text colors for better visibility */
.tm-settings-title,
.tm-settings-section h3 {
    color: var(--color-white);
}

.tm-settings-explanation {
    color: rgba(255, 255, 255, 0.8);
}

/* Settings Panel Text */
.tm-settings-section {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Help Panel Styles */
#help-overlay .tm-modal-content {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    width: 90%;
    max-width: 500px;
}

.tm-help-content {
    padding: 0;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-height: 60vh;
    overflow-y: auto;
}

.tm-help-section {
    margin-bottom: 25px;
}

.tm-help-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: normal;
}

.tm-help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-help-section li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.tm-help-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.tm-help-green { background-color: #00ff00; }
.tm-help-yellow { background-color: #ffff00; }
.tm-help-red { background-color: #ff0000; }
.tm-help-overtime { background-color: #ff0000; opacity: 0.5; }

kbd {
    font-family: 'Geist Mono', monospace;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    color: white;
    display: inline-block;
    font-size: 0.85em;
    line-height: 1;
    padding: 3px 6px;
    margin: 0 3px;
    vertical-align: middle;
}

.tm-help-grid,
.tm-help-type,
.tm-help-type strong,
.tm-help-type p {
    display: none;
}

/* Fade Styles */
.tm-app-container,
.tm-timer-container {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.tm-app-container.tm-show,
.tm-timer-container.tm-show {
    opacity: 1;
}

.tm-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tm-dimmed {
    opacity: 0.5;
}

.tm-timer-hidden {
    display: none !important;
}

/* Copyright Notice */
.tm-copyright {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(128, 128, 128, 0.7);
    font-size: 12px;
    z-index: 1;
    padding-left:12px;
    padding-right:12px;
}

.tm-copyright a {
    color: rgba(128, 128, 128, 0.7);
    text-decoration: none;
}

.tm-copyright a:hover {
    text-decoration: underline;
}

.tm-control-panel,
.tm-modal,
.tm-settings-button,
.speakipedia-button {
    cursor: default;
}

.tm-control-panel button,
.tm-modal button {
    cursor: pointer;
}

/* Settings Layout */
.tm-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 0.5rem;
}

/* Settings Section */
.tm-settings-section {
    display: flex;
    flex-direction: column;
}

/* Section headings */
.tm-settings-section h2 {
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    padding: 0;
    color: var(--color-white);
}

/* Preview containers */
.tm-screen-preview,
#background-toggle {
    margin-bottom: 2rem;
}

/* Settings explanation text */
.tm-settings-explanation {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Section Spacing */
.tm-position-selector,
.tm-background-toggle {
    margin-top: 3rem;
}

.tm-position-selector h3,
.tm-background-toggle h3 {
    margin-bottom: 1rem;
    color: var(--color-white);
    font-size: 1.1rem;
}

/* Background Toggle Styles */
#background-toggle {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

/* Base layer with chroma green */
.tm-toggle-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00ff00;
    display: flex;
}

/* Color strips */
.tm-color-strip {
    flex: 1;
    height: 100%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.tm-color-strip.tm-green { background: var(--color-bright-green); }
.tm-color-strip.tm-yellow { background: var(--color-yellow); }
.tm-color-strip.tm-red { background: var(--color-red); }

/* Chroma state - hide the strips */
.tm-chroma .tm-toggle-icon .tm-color-strip {
    opacity: 0;
}

/* Preview clocks in toggle */
#background-toggle .tm-clock {
    position: absolute;
    font-family: 'Geist Mono', monospace;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.75);
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    transition: all 0.3s ease;
}

#background-toggle .tm-clock.tm-active {
    opacity: 1;
}

#background-toggle .tm-clock.tm-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6rem;
}

#background-toggle .tm-clock.tm-corner {
    font-size: 2rem;
}

#background-toggle .tm-clock.tm-top-left {
    top: 1rem;
    left: 1rem;
}

#background-toggle .tm-clock.tm-top-right {
    top: 1rem;
    right: 1rem;
}

#background-toggle .tm-clock.tm-bottom-left {
    bottom: 1rem;
    left: 1rem;
}

#background-toggle .tm-clock.tm-bottom-right {
    bottom: 1rem;
    right: 1rem;
}

/* Stripes background */
.tm-toggle-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.tm-color-strip {
    flex: 1;
    height: 100%;
}
