/* NowUTC - UTC Clock Widget Styles */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #000000;
    --text-color: #FFFFFF;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Widget page
   ========================================================================== */

[data-page="widget"] {
    overflow: hidden;
}

[data-page="widget"] #clock-container {
    text-align: center;
    user-select: none;
    max-width: 100vw;
    max-height: 100vh;
    padding: 0;
}

#utc-date {
    font-size: clamp(0.8rem, min(8vw, 11vh), 4rem);
    opacity: 0.5;
    line-height: 1.2;
}

#utc-time {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(2rem, min(28vw, 50vh), 40rem);
    font-weight: bold;
    cursor: pointer;
    line-height: 0.85;
    margin: -0.02em 0 -0.05em;
}

#utc-time:hover {
    opacity: 0.85;
}

#tz-label {
    font-size: clamp(0.45rem, min(3.5vw, 4.5vh), 2.2rem);
    opacity: 0.6;
    letter-spacing: 0.05em;
    margin-top: 0.1em;
    white-space: nowrap;
}

/* Timezone row with arrows */
#tz-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.3rem, 1.5vw, 2rem);
}

#secondary-tz {
    font-size: clamp(0.8rem, min(8vw, 11vh), 4rem);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 150ms ease;
}

.tz-arrow {
    font-size: clamp(0.5rem, min(5vw, 7vh), 3rem);
    opacity: 0.3;
    cursor: pointer;
    transition: opacity 200ms ease;
    user-select: none;
    line-height: 1;
}

.tz-arrow:hover,
.tz-arrow:focus-visible {
    opacity: 0.7;
}

/* Epoch timestamp */
#epoch-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(0.4rem, min(3vw, 4vh), 1.5rem);
    opacity: 0.35;
    cursor: pointer;
    margin-top: 0.2em;
    transition: opacity 200ms ease;
}

#epoch-display:hover {
    opacity: 0.7;
}

/* Countdown timer */
#countdown-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(0.6rem, min(5vw, 7vh), 2.5rem);
    opacity: 0.7;
    margin-top: 0.15em;
    letter-spacing: 0.05em;
}

#countdown-display.countdown-reached {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Copied notification */
#copied-msg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 40, 0.92);
    border: 1px solid rgba(59, 29, 192, 0.75);
    color: #ffffff;
    padding: 0.5em 1.5em;
    border-radius: 8px;
    font-size: clamp(1rem, 3vw, 2.5rem);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
    z-index: 300;
}

#copied-msg.visible {
    opacity: 1;
}

/* Widget popup link */
#widget-link {
    position: fixed;
    bottom: .75rem;
    right: 4.0rem;
    color: var(--text-color);
    opacity: 0.5;
    font-size: 1.5rem;
    text-decoration: none;
    transition: opacity 200ms ease;
}

#widget-link:hover {
    opacity: 1.0;
}

/* Settings gear */
#settings-link {
    position: fixed;
    bottom: .75rem;
    right: 1.05rem;
    color: var(--text-color);
    opacity: 0.5;
    font-size: 1.5rem;
    text-decoration: none;
    transition: opacity 200ms ease;
}

#settings-link:hover {
    opacity: 1.0;
}

/* Footer (widget page - fixed bottom) */
footer {
    position: fixed;
    bottom: 0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-sep {
    opacity: 0.4;
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 200ms ease;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==========================================================================
   Config page
   ========================================================================== */

[data-page="config"] {
    background-color: #000000;
    color: #FFFFFF;
    justify-content: flex-start;
    padding: 2rem;
}

[data-page="config"] main {
    max-width: 800px;
    width: 100%;
}

[data-page="config"] h1,
[data-page="reference"] h1 {
    margin-bottom: 0;
    font-size: 1.6rem;
}

/* Branding header */
.page-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.brand-logo {
    border-radius: 10px;
}

/* Config sections */
.config-section {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.config-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-section h3 {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.section-desc {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

/* Radio group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    margin: -0.3rem -0.5rem;
    transition: background 200ms ease;
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.06);
}

.radio-label input[type="radio"],
.radio-label input[type="checkbox"] {
    accent-color: #4A90D9;
}

/* Two-column timezone grid */
.tz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.tz-grid-col {
    position: relative;
}

.tz-grid-col h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Two-column color grid */
.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 550px) {
    .tz-grid,
    .color-grid {
        grid-template-columns: 1fr;
    }
}

/* Timezone search */
#tz-search {
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

#tz-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#tz-search:focus {
    outline: 2px solid #4A90D9;
    outline-offset: 1px;
    border-color: transparent;
}

/* Timezone list */
#tz-list {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: #0a0a0a;
}

.tz-option {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, padding-left 150ms ease;
}

.tz-option:hover {
    background: rgba(74, 144, 217, 0.3);
    color: #7cb8f0;
    padding-left: 1rem;
}

.tz-option.tz-empty {
    color: rgba(255, 255, 255, 0.4);
    cursor: default;
    font-style: italic;
}

.tz-option.tz-empty:hover {
    background: transparent;
}

/* Favorites chips */
#favorites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 2rem;
}

.fav-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(74, 144, 217, 0.25);
    border: 1px solid rgba(74, 144, 217, 0.4);
    border-radius: 16px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    color: #fff;
    cursor: pointer;
    transition: background 200ms ease, border-color 200ms ease, transform 150ms ease;
}

.fav-chip:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateY(-1px);
}

.fav-chip-x {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    line-height: 1;
}

.fav-chip:hover .fav-chip-x {
    color: #ff6b6b;
}

.fav-empty {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    padding: 0.25rem 0;
}

/* Quick Add US Timezones */
.quick-add-box {
    margin-top: 1rem;
    border: 1px solid rgba(74, 144, 217, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    background: rgba(74, 144, 217, 0.06);
}

.quick-add-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.quick-add-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.quick-add-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.25rem 0.6rem;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 200ms ease, border-color 200ms ease, transform 150ms ease, box-shadow 200ms ease;
}

.quick-add-item:hover {
    background: rgba(74, 144, 217, 0.25);
    border-color: rgba(74, 144, 217, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.2);
}

.quick-add-plus {
    color: #4ade80;
    font-weight: bold;
    font-size: 0.85rem;
    line-height: 1;
}

/* Color picker row */
.color-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.color-row label {
    min-width: 90px;
    font-size: 0.9rem;
}

.color-row input[type="color"] {
    width: 40px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    padding: 2px;
}

.color-row input[type="text"] {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
    width: 100px;
}

/* Color scheme header row */
.color-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.color-header h2 {
    margin-bottom: 0;
}

/* Color presets */
#color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.color-preset {
    width: 2.5rem;
    height: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: transform 150ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.color-preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Color preview */
#color-preview {
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    color: #fff;
}

.preview-time {
    display: block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.preview-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Contrast info */
#contrast-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0;
}

.contrast-excellent {
    color: #4ade80;
}

.contrast-good {
    color: #a3e635;
}

.contrast-warning {
    color: #fbbf24;
}

.contrast-error {
    color: #f87171;
}

/* Widget size inputs */
.widget-size-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.widget-size-row label {
    font-size: 0.9rem;
}

.widget-size-row input[type="number"] {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
    width: 80px;
}

.widget-size-row input[type="number"]:focus {
    outline: 2px solid #4A90D9;
    outline-offset: 1px;
    border-color: transparent;
}

.size-unit {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Buttons */
.config-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 150ms ease, background 200ms ease, transform 150ms ease, box-shadow 200ms ease;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid #4A90D9;
    outline-offset: 2px;
}

.btn-primary {
    background: #4A90D9;
    color: #fff;
}

.btn-primary:hover {
    background: #3a7bc4;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(74, 144, 217, 0.3);
}

.btn-primary:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.btn-widget {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
}

.btn-widget:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.btn-share {
    background: rgba(74, 144, 217, 0.12);
    color: rgba(180, 210, 240, 0.85);
    border: 1px solid rgba(74, 144, 217, 0.25);
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
}

.btn-share:hover {
    color: #fff;
    background: rgba(74, 144, 217, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: rgba(252, 165, 165, 0.85);
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
}

.btn-danger:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* Focus outlines */
:focus-visible {
    outline: 2px solid #4A90D9;
    outline-offset: 2px;
}

/* Config/About footer (static, centered) */
[data-page="config"] footer,
[data-page="reference"] footer {
    position: static;
    margin-top: 2rem;
    justify-content: center;
    width: 100%;
    opacity: 0.5;
}

/* ==========================================================================
   About page
   ========================================================================== */

[data-page="reference"] {
    background-color: #000000;
    color: #FFFFFF;
    justify-content: flex-start;
    padding: 2rem;
}

[data-page="reference"] main {
    max-width: 80rem;
    width: 100%;
}

.about-section {
    margin-bottom: 1.5rem;
}

.about-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.about-list {
    list-style: none;
    padding: 0;
}

.about-list li {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.3rem;
}

.about-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: #4A90D9;
}

.about-link {
    color: #4A90D9;
    text-decoration: none;
    transition: opacity 200ms ease;
}

.about-link:hover {
    text-decoration: underline;
}

/* Reference tables */
.ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.ref-table th,
.ref-table td {
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.4rem 0.6rem;
    text-align: left;
}

.ref-table th {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
    white-space: nowrap;
}

.ref-table td code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.ref-table-compact td:first-child {
    white-space: nowrap;
}

.ref-code {
    background: #0a0a0a;
    color: #67e8f9;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    overflow-x: auto;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.about-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Scrollbar for tz-list */
#tz-list::-webkit-scrollbar {
    width: 6px;
}

#tz-list::-webkit-scrollbar-track {
    background: transparent;
}

#tz-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#tz-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* DST transition indicator */
.dst-indicator {
    color: #fbbf24;
    font-weight: 600;
}

/* ==========================================================================
   Format copy tray
   ========================================================================== */

.format-tray {
    position: fixed;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid rgba(59, 29, 192, 0.75);
    border-radius: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    width: clamp(280px, 80vw, 520px);
    max-height: 85vh;
    z-index: 150;
}

.format-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    transition: background 150ms ease;
    font-size: clamp(0.55rem, min(2.5vw, 3vh), 0.9rem);
}

.format-row:hover {
    background: rgba(74, 144, 217, 0.2);
}

.format-row + .format-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.format-label {
    min-width: 5.5em;
    opacity: 0.7;
    font-size: 1.3em;
    text-align: right;
}

.format-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.3em;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.format-icon {
    opacity: 0.3;
    font-size: 1.3em;
    flex-shrink: 0;
}

.format-row:hover .format-icon {
    opacity: 0.7;
}

/* ==========================================================================
   Epoch row + converter toggle
   ========================================================================== */

#epoch-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.3rem, 1vw, 0.6rem);
}

#converter-toggle {
    font-size: clamp(0.4rem, min(2.5vw, 3.5vh), 1.2rem);
    opacity: 0.25;
    cursor: pointer;
    transition: opacity 200ms ease;
}

#converter-toggle:hover,
#converter-toggle:focus-visible {
    opacity: 0.7;
}

/* ==========================================================================
   Timestamp converter
   ========================================================================== */

#converter {
    position: fixed;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(59, 29, 192, 0.75);
    border-radius: 8px;
    width: clamp(280px, 80vw, 520px);
    max-height: 65vh;
    overflow-y: auto;
    z-index: 160;
    padding: 0.5rem;
}

.converter-input-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

#converter-input {
    flex: 1;
    background: #0a0a0a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.45rem 0.6rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}

#converter-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#converter-input:focus {
    outline: 2px solid #4A90D9;
    outline-offset: 1px;
    border-color: transparent;
}

.converter-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
    transition: color 150ms ease;
}

.converter-close-btn:hover {
    color: #fff;
}

#converter-results {
    margin-top: 0.3rem;
}

.converter-error {
    color: #f87171;
    font-size: 0.8rem;
    padding: 0.3rem 0;
}

/* ==========================================================================
   Desktop tile grid view
   ========================================================================== */

[data-view="desktop"] #clock-container,
[data-view="desktop"] #epoch-row,
[data-view="desktop"] #tz-row,
[data-view="desktop"] #tz-label,
[data-view="desktop"] #format-tray,
[data-view="desktop"] #converter { display: none !important; }

[data-view="desktop"] {
    justify-content: flex-start;
    padding: 2rem;
    overflow: auto;
}

[data-view="desktop"] main {
    display: none;
}

[data-view="widget"] #desktop-container { display: none !important; }

@media (max-width: 899px) {
    #view-toggle { display: none !important; }
}

#desktop-container {
    max-width: 80rem;
    width: 100%;
    margin: 0 auto;
}

.desktop-header {
    margin-bottom: 1.5rem;
}

.desktop-utc-tile {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    text-align: center;
    position: relative;
}

.desktop-utc-tile .tile-label {
    font-size: 0.9rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.desktop-utc-tile .tile-time {
    font-family: 'Courier New', Courier, monospace;
    font-size: 4rem;
    font-weight: bold;
    line-height: 1.1;
}

.desktop-utc-tile .tile-date {
    font-size: 1rem;
    opacity: 0.5;
    margin-top: 0.25rem;
}

.tile-copy {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    opacity: 0.3;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 200ms ease;
}

.tile-copy:hover,
.tile-copy:focus-visible {
    opacity: 0.8;
}

.desktop-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.desktop-tile {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    position: relative;
    transition: border-color 200ms ease, background 200ms ease;
    cursor: default;
}

.desktop-tile:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.desktop-tile .tile-city {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.desktop-tile .tile-custom-label {
    font-size: 0.75rem;
    opacity: 0.4;
}

.desktop-tile .tile-time {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.2;
}

.desktop-tile .tile-meta {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 0.15rem;
}

.desktop-tile .tile-dst {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.75rem;
}

.desktop-tile .tile-copy {
    font-size: 0.85rem;
}

.desktop-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.6;
}

.desktop-empty p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* View toggle icon */
#view-toggle {
    position: fixed;
    bottom: .75rem;
    right: 7.0rem;
    color: var(--text-color);
    opacity: 0.5;
    font-size: 1.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 200ms ease;
}

#view-toggle:hover {
    opacity: 1.0;
}

/* Hide view toggle in embed/popup */
.embed-mode #view-toggle { display: none !important; }

/* ==========================================================================
   First-time wizard overlay
   ========================================================================== */

.wizard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    padding: 1rem;
}

.wizard-card {
    background: #1a1a1a;
    border: 1px solid rgba(59, 29, 192, 0.75);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.wizard-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.wizard-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 200ms ease;
}

.wizard-dot.active {
    background: #4A90D9;
}

.wizard-dot.completed {
    background: #4ade80;
}

.wizard-icon {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #4A90D9;
}

.wizard-title {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.wizard-text {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
}

.wizard-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.wizard-list li {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
    color: #fff;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.2rem;
}

.wizard-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

/* Wizard color presets */
.wizard-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.wizard-preset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 150ms ease, border-color 200ms ease, box-shadow 200ms ease;
    background: none;
}

.wizard-preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wizard-preset.selected {
    border-color: #4A90D9;
    box-shadow: 0 0 0 1px #4A90D9, 0 4px 12px rgba(74, 144, 217, 0.3);
}

/* Wizard timezone picker */
.wizard-tz-search {
    width: 100%;
    background: #0a0a0a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.wizard-tz-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.wizard-tz-search:focus {
    outline: 2px solid #4A90D9;
    outline-offset: 1px;
    border-color: transparent;
}

.wizard-tz-list {
    position: relative;
    z-index: 10;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: #0a0a0a;
    margin-bottom: 0.5rem;
}

.wizard-favorites {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 1rem;
    margin-bottom: 0.5rem;
}

/* Wizard tips */
.wizard-tips {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.75rem 0;
}

.wizard-tip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.wizard-tip i,
.wizard-tip kbd {
    min-width: 2rem;
    text-align: center;
    color: #4A90D9;
    font-size: 1rem;
}

.wizard-ready {
    margin-top: 0.75rem;
    font-weight: 600;
    color: #4ade80 !important;
    opacity: 1 !important;
}

/* Wizard navigation */
.wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    gap: 0.5rem;
}

.wizard-btn {
    min-width: 80px;
}

.wizard-skip {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    transition: color 200ms ease;
}

.wizard-skip:hover {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 480px) {
    .wizard-card {
        padding: 1rem 1.25rem;
        border-radius: 12px;
    }

    .wizard-presets {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .wizard-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .wizard-skip {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 0.25rem;
    }
}

/* ==========================================================================
   Keyboard shortcut overlay
   ========================================================================== */

.shortcut-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.shortcut-card {
    background: #1a1a1a;
    border: 1px solid rgba(59, 29, 192, 0.75);
    border-radius: 12px;
    padding: .5rem 1rem;
    max-width: 340px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.shortcut-title {
    font-size: clamp(0.85rem, 3vw, 1.1rem);
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
    text-align: center;
}

.shortcut-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    color: rgba(255, 255, 255, 0.8);
}

.shortcut-row span {
    margin-left: auto;
}

.shortcut-hint {
    margin-top: 0.1rem;
    font-size: 0.7rem;
    opacity: 0.4;
    text-align: center;
}

kbd {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.15em 0.45em;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    min-width: 1.6em;
    text-align: center;
    color: #fff;
}

/* ==========================================================================
   Embed mode
   ========================================================================== */

.embed-mode footer,
.embed-mode #widget-link,
.embed-mode #settings-link,
.embed-mode #converter-toggle { display: none !important; }

.embed-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.embed-textarea {
    width: 100%;
    background: #0a0a0a;
    color: #67e8f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    resize: vertical;
}

.embed-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.embed-options label {
    font-size: 0.85rem;
    opacity: 0.7;
}

.embed-options input[type="text"] {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
    width: 70px;
}

/* ==========================================================================
   View Transitions (progressive enhancement)
   ========================================================================== */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-fade-out 150ms ease-out; }
::view-transition-new(root) { animation: vt-fade-in 150ms ease-in; }
@keyframes vt-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Reduced motion preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    #countdown-display.countdown-reached { animation: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0s; }
    #secondary-tz, .tz-arrow, #epoch-display, #widget-link,
    #settings-link, #copied-msg, .tz-option, .fav-chip,
    .quick-add-item, .color-preset, .btn, .btn-danger, .radio-label,
    .wizard-dot, .wizard-preset, .wizard-skip {
        transition-duration: 0s;
    }
}
