﻿/* ================================================================
   TIMER SHRED — Dark Matrix Theme + Timer Styles
   ================================================================ */

/* ===== CSS Variables (Dark Theme from frontend template) ===== */
:root {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 6%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 6%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 12%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 12%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 12%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;
    --radius: 0.5rem;
    --green: 120 100% 50%;
    --purple: 271 81% 56%;
}

/* ===== Material Symbols ===== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== Dark Body & Section Backgrounds ===== */
body {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}

.tool-card,
.bg-surface-container-low {
    background: rgba(255,255,255,0.05);
    border: 1px solid hsl(var(--border));
    transition: all 0.3s ease;
}

.tool-card:hover,
.bg-surface-container-low.glow-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 255, 0, 0.3);
}

.glow-box {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* ===== Header & Navigation Dark Theme ===== */
header.sticky {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
}

a.text-purple-900 {
    color: hsl(var(--foreground)) !important;
}

a.text-gray-600 {
    color: hsl(var(--muted-foreground)) !important;
}

a.text-gray-500 {
    color: #9ca3af !important;
}

a.text-gray-700 {
    color: #d1d5db !important;
}

a.text-purple-600,
.text-purple-600 {
    color: hsl(var(--green)) !important;
}

a.hover\:text-purple-600:hover,
a.hover\:text-purple-700:hover {
    color: hsl(var(--green)) !important;
}

.mobile-nav {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
}

/* ===== Gradient Background (Hero) ===== */
.gradient-bg {
    background: linear-gradient(135deg, #000000, #0a0a0f, #111122);
}

.gradient-text {
    background: linear-gradient(to right, hsl(var(--green)), #4ade80, hsl(var(--purple)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.headline-bg {
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

h1.gradient-text.headline-bg {
    text-shadow: none;
}

/* ================================================================
   FULL-PAGE MATRIX BACKGROUND
   ================================================================ */
.matrix-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #000000, #0a0a0f, #111122);
    overflow: hidden;
    pointer-events: none;
}

.matrix-bg-char {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 300;
    color: #334155;
    opacity: 0.35;
    transition: color 0.1s, transform 0.1s, text-shadow 0.1s;
    will-change: transform, top;
    transform: translate(-50%, -50%);
}

.matrix-bg-char.glow {
    color: #00ff00;
    font-weight: 700;
    font-size: 1.8rem;
    opacity: 1;
    z-index: 5;
    transform: translate(-50%, -50%) scale(1.25);
    text-shadow: 0 0 8px rgba(255,255,255,0.8), 0 0 12px rgba(255,255,255,0.4);
}

/* ================================================================
   TEXT SCRAMBLE — Title Effect
   ================================================================ */
.text-scramble .dud {
    color: #0f0;
    opacity: 0.7;
}

/* ================================================================
   TIMER CORE LAYOUT
   ================================================================ */
/* ===== Timer Display Area ===== */
.timer-display-area {
    text-align: center;
    padding: 2rem 1rem 2.5rem;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#timerDisplay {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

#timerDisplay .timer-block {
    flex: 1 1 auto;
    min-width: 0;
}

#timerDisplay .timer-sep,
#timerDisplay .neon-sep {
    flex: 0 0 auto;
}

@media (min-width: 768px) {
    #timerDisplay { gap: 0.75rem; }
}

.timer-loading {
    color: hsl(var(--muted-foreground));
    font-size: 1.3rem;
    padding: 2rem;
}

/* ===== Mode Tabs Row ===== */
.mode-row {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

/* ===== Mode Tabs ===== */
.mode-tabs {
    display: inline-flex;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
}

.mode-tab {
    padding: 0.78rem 1.3rem;
    border: none;
    background: transparent;
    color: hsl(var(--foreground));
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mode-tab:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.mode-tab.active {
    background: hsl(var(--foreground) / 0.15);
    color: hsl(var(--foreground));
    font-weight: 600;
}

.mode-tab + .mode-tab {
    border-left: 1px solid hsl(var(--border));
}

/* ===== Action Button Row ===== */
.action-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.8rem 0 1.5rem;
}

/* ===== Action Button ===== */
.action-btn {
    padding: 0.78rem 2.6rem;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, hsl(var(--green)), #4ade80);
    color: #000;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 16px rgba(0, 255, 0, 0.25);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(0, 255, 0, 0.4);
}

.action-btn:active {
    transform: scale(0.97);
}

/* ===== Settings Panel ===== */
.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Template Selector Grid ===== */
.template-selector-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.65rem;
}

@media (max-width: 768px) {
    .template-selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Inline Field Row (Start Time / Target Time) ===== */
.inline-field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.inline-field-row .date-field {
    background: hsl(var(--input));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    font-size: 1.1rem;
    color: hsl(var(--foreground));
    outline: none;
    width: 170px;
    min-width: 150px;
    box-sizing: border-box;
    font-family: 'JetBrains Mono', monospace;
}

.inline-field-row .num-field {
    background: hsl(var(--input));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.65rem 0.35rem;
    font-size: 1.1rem;
    color: hsl(var(--foreground));
    outline: none;
    width: 54px;
    text-align: center;
    box-sizing: border-box;
    font-family: 'JetBrains Mono', monospace;
}

.time-unit-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
}

.time-hint {
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

.inline-field-row .num-field:focus,
.inline-field-row .date-field:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
}

.num-field::-webkit-inner-spin-button,
.num-field::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.num-field {
    -moz-appearance: textfield;
}

.field-label {
    font-size: 1.04rem;
    color: hsl(var(--green));
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

@media (max-width: 480px) {
    .inline-field-row {
        justify-content: center;
    }
    .inline-field-row .date-field {
        width: 100%;
    }
    .field-label {
        width: 100%;
        text-align: center;
    }
}

/* ===== IP Time Info ===== */
.ip-time-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: hsl(var(--green));
    white-space: nowrap;
}

.ip-tz {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
}

.timezone-hint {
    font-size: 0.65rem;
    color: hsl(var(--muted-foreground));
    margin-left: 0.75rem;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .timezone-hint {
        margin-left: 0;
        display: block;
        text-align: center;
        margin-top: 0.25rem;
    }
}

/* ===== Title Field ===== */
.title-field {
    width: 100%;
    background: hsl(var(--input));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.78rem 0.85rem;
    font-size: 1.17rem;
    color: hsl(var(--foreground));
    outline: none;
    box-sizing: border-box;
}

.title-field:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
}

.template-btn {
    padding: 0.78rem 0.5rem;
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius);
    background: transparent;
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 1.1rem;
    width: 100%;
    min-width: 0;
}

.template-btn:hover {
    border-color: hsl(var(--muted-foreground) / 0.5);
    color: hsl(var(--foreground));
}

.template-btn.active {
    border-color: hsl(var(--foreground));
    background: hsl(var(--foreground) / 0.08);
    color: hsl(var(--foreground));
}

.template-btn .tpl-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.template-btn .tpl-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.template-btn.active .tpl-icon {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
}

.template-btn .tpl-name {
    font-weight: 600;
    font-size: 0.98rem;
    text-align: center;
    white-space: nowrap;
}

/* ================================================================
   TIMER DISPLAY STYLES (6 variants)
   ================================================================ */

/* ===== Common ===== */
.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-sep {
    font-size: 3rem;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
    align-self: center;
}

.timer-label {
    font-size: 0.91rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--muted-foreground));
    margin-top: 0.65rem;
}

.timer-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

/* --- 1. Digital --- */
#timerDisplay .digital-block {
    /* container for flex alignment */;
}

.digital-block .timer-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem 1.3rem;
    min-width: 100px;
}

.digital-block .timer-number {
    font-size: 3.75rem;
    color: hsl(var(--foreground));
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .digital-block .timer-card { min-width: 150px; padding: 1.5rem 2rem; }
    .digital-block .timer-number { font-size: 5.25rem; }
}

/* --- 2. Analog --- */
.analog-ring {
    position: relative;
}

.analog-ring .ring-bg {
    color: hsl(var(--muted));
}

.analog-ring .ring-fg {
    color: hsl(var(--foreground));
}

.ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.25rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

/* --- 3. Minimalist --- */
.timer-minimalist {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    width: 100%;
}

.min-num {
    font-size: 6rem;
    font-weight: 200;
    color: hsl(var(--foreground));
    letter-spacing: -0.03em;
}

.min-unit {
    font-size: 2.25rem;
    color: hsl(var(--muted-foreground));
    margin: 0 0.45rem;
}

@media (min-width: 768px) {
    .min-num { font-size: 9rem; }
    .min-unit { font-size: 3rem; }
}

/* --- 4. Neon --- */
.neon-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius);
    padding: 1rem 1.3rem;
    min-width: 95px;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(59, 130, 246, 0.05);
}

.neon-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.75rem;
    font-weight: 700;
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.8), 0 0 20px rgba(96, 165, 250, 0.6), 0 0 30px rgba(96, 165, 250, 0.4);
}

.neon-sep {
    font-size: 3rem;
    font-weight: 700;
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
    margin-bottom: 1.5rem;
    align-self: center;
}

@media (min-width: 768px) {
    .neon-card { min-width: 135px; padding: 1.5rem 1.6rem; }
    .neon-number { font-size: 5.25rem; }
}

/* --- 5. Flip --- */
.flip-card {
    position: relative;
    width: 135px;
    height: 160px;
    background: rgba(255,255,255,0.05);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 4.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    overflow: hidden;
}

@media (min-width: 768px) {
    .flip-card { width: 170px; height: 190px; font-size: 6rem; }
}

.flip-num { line-height: 1; }

.flip-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 4.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    line-height: 1;
    z-index: 3;
    transform-origin: bottom center;
    animation: flipFold 0.35s ease-in forwards;
}

@media (min-width: 768px) {
    .flip-overlay { font-size: 6rem; }
}

@keyframes flipFold {
    0%   { transform: rotateX(0deg); opacity: 1; }
    60%  { transform: rotateX(70deg); opacity: 0.9; }
    100% { transform: rotateX(90deg); opacity: 0; }
}

/* --- 6. Gradient --- */
.gradient-card {
    border-radius: var(--radius);
    padding: 1rem 1.3rem;
    min-width: 100px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.gradient-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .gradient-card { min-width: 150px; padding: 1.5rem 2rem; }
    .gradient-number { font-size: 5.25rem; }
}

.gradient-card:hover {
    transform: scale(1.05);
}

.g-card-purple { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.g-card-pink { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.g-card-blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.g-card-green { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.g-card-orange { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.g-card-red { background: linear-gradient(135deg, #f857a6 0%, #ff5858 100%); }
.g-card-teal { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.g-card-indigo { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }

/* ===== Timer Title/Subtitle ===== */
.timer-title-area {
    text-align: center;
    margin-bottom: 2rem;
}

#timerTitle {
    font-size: 1.95rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

#timerSubtitle {
    font-size: 1.17rem;
    color: hsl(var(--muted-foreground));
}

@media (min-width: 768px) {
    #timerTitle { font-size: 2.6rem; }
}

/* ================================================================
   FAQ & Content Sections (Dark Theme)
   ================================================================ */
.faq-item {
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 16px 20px;
    background: rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 255, 0, 0.4);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.faq-item .faq-icon {
    color: hsl(var(--green)) !important;
}

.text-purple-900,
.text-purple-900 * {
    color: hsl(var(--foreground)) !important;
}

.faq-item h3.text-purple-900 {
    color: hsl(var(--foreground)) !important;
}

.text-gray-600,
p.text-gray-600 {
    color: hsl(var(--muted-foreground)) !important;
}

/* ===== Collapsible Navigation ===== */
.collapse-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapse-nav.open {
    max-height: 2000px;
}

.collapse-trigger {
    cursor: pointer;
    user-select: none;
}

.collapse-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.collapse-arrow.open {
    transform: rotate(180deg);
}

/* ===== Mobile Nav ===== */
.mobile-nav {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
}

.header-bar {
    height: 64px;
}

.mobile-nav .border-t { border-color: hsl(var(--border)); }

.hamburger-btn {
    border: none;
    background: transparent;
    cursor: pointer;
}

.hamburger-spacer {
    visibility: hidden;
}

@media (min-width: 768px) {
    .hamburger-btn { display: none; }
    .hamburger-spacer { display: none; }
}

/* ===== Share Buttons ===== */
#shareBar { position: relative; }

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px) scale(1.1);
    border-color: hsl(var(--green));
    box-shadow: 0 4px 16px rgba(0, 255, 0, 0.3);
}

.share-btn .material-symbols-outlined { font-size: 25px; }
.share-btn .share-text { font-family: 'Sora', sans-serif; font-size: 23px; font-weight: 700; }
.share-btn.copied { background: #4caf50; color: #fff; border-color: #4caf50; }

#shareBar .share-btn[data-platform="copy"] { background: #7c3aed; color: #fff; border-color: #7c3aed; }
#shareBar .share-btn[data-platform="x"] { background: #1a1a1a; color: #fff; border-color: #444; }
#shareBar .share-btn[data-platform="facebook"] { background: #2563eb; color: #fff; border-color: #2563eb; }
#shareBar .share-btn[data-platform="reddit"] { background: #ea580c; color: #fff; border-color: #ea580c; }

.share-toast {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #333;
    padding: 8px 18px;
    border-radius: var(--radius);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.share-toast.show { opacity: 1; }

/* ===== Fullscreen Button ===== */
.fullscreen-btn {
    width: auto;
    height: auto;
    padding: 0.78rem 0.9rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.fullscreen-btn:hover {
    border-color: hsl(var(--foreground));
    background: hsl(var(--foreground)/0.08);
}

/* ===== Reset Button ===== */
.reset-btn {
    width: auto;
    height: auto;
    padding: 0.78rem 0.9rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.reset-btn:hover {
    border-color: hsl(var(--foreground));
    background: hsl(var(--foreground)/0.08);
}

/* ===== Duration Preset Buttons ===== */
.duration-presets {
    width: 100%;
}

.dur-manual { display: flex; align-items: center; gap: 0.5rem; justify-content: center; margin-top: 0.5rem; }.dur-manual .field-label { font-size: 0.9rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }.dur-manual .num-field { background: hsl(var(--input)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 0.45rem 0.5rem; font-size: 1rem; color: hsl(var(--foreground)); outline: none; width: 80px; text-align: center; font-family: 'JetBrains Mono',monospace; }.dur-manual .num-field:focus { border-color: hsl(var(--ring)); box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3); }.dur-manual .dur-manual-input { width: 160px; padding-right: 30%; box-sizing: border-box; }.dur-input-wrap { position: relative; display: inline-block; }.dur-confirm-btn { position: absolute; right: 0; top: 0; bottom: 0; width: 30%; border: none; border-left: 1px solid hsl(var(--border)); border-radius: 0 var(--radius) var(--radius) 0; background: hsl(var(--foreground) / 0.08); color: hsl(var(--green)); cursor: pointer; font-size: 1rem; font-weight: 700; font-family: 'JetBrains Mono',monospace; transition: all 0.2s ease; }.dur-confirm-btn:hover { background: hsl(var(--green) / 0.15); }

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.dbtn-zero,
.dbtn {
    padding: 0.45rem 0.9rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: transparent;
    color: hsl(var(--foreground));
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
}

.dbtn-zero {
    border-color: hsl(var(--green));
    color: hsl(var(--green));
}

.dbtn-zero:hover,
.dbtn:hover {
    background: rgba(255,255,255,0.08);
    border-color: hsl(var(--foreground));
}

/* ===== Fullscreen Overlay ===== */
.fs-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fs-overlay.dark-bg {
    background: #000;
}

/* ===== Fullscreen Timer Container ===== */
.fs-timer-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 2rem;
    box-sizing: border-box;
    transform: translateY(-5vh);
}

/* Fullscreen Matrix BG — absolute inside overlay */
#fsMatrixBg.matrix-bg {
    position: absolute;
    z-index: 1;
    background: transparent;
}

/* Exit + dark bg buttons — top-right, fades on idle */
.fs-bg-btn,
.fs-exit-btn {
    position: fixed;
    top: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid hsl(var(--border));
    border-radius: 50%;
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.fs-bg-btn { right: 5rem; }
.fs-exit-btn { right: 1.5rem; }

.fs-bg-btn:hover,
.fs-exit-btn:hover {
    color: hsl(var(--foreground));
    border-color: hsl(var(--foreground));
}

/* ===== Fullscreen Enlarged Timer ===== */
#fullscreenOverlay #fsTimerDisplay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.3rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

#fullscreenOverlay #fsTimerDisplay .analog-block,
#fullscreenOverlay #fsTimerDisplay .flip-block,
#fullscreenOverlay #fsTimerDisplay .gradient-block {
    margin: 0 1rem;
}

#fullscreenOverlay #fsTimerDisplay .digital-block .timer-card { padding: 1.95rem 2.6rem; }
#fullscreenOverlay #fsTimerDisplay .digital-block .timer-number { font-size: 7.8rem; }
#fullscreenOverlay #fsTimerDisplay .timer-sep { font-size: 5.2rem; }

#fullscreenOverlay #fsTimerDisplay .analog-ring { width: 286px; height: 286px; }
#fullscreenOverlay #fsTimerDisplay .ring-value { font-size: 3.9rem; }

#fullscreenOverlay #fsTimerDisplay .min-num { font-size: 10.4rem; }
#fullscreenOverlay #fsTimerDisplay .min-unit { font-size: 3.9rem; }

#fullscreenOverlay #fsTimerDisplay .neon-card { padding: 1.95rem 2.6rem; }
#fullscreenOverlay #fsTimerDisplay .neon-number { font-size: 7.8rem; }
#fullscreenOverlay #fsTimerDisplay .neon-sep { font-size: 5.2rem; }

#fullscreenOverlay #fsTimerDisplay .flip-card { width: 195px; height: 228px; font-size: 7.15rem; }
#fullscreenOverlay #fsTimerDisplay .flip-overlay { font-size: 7.15rem; }

#fullscreenOverlay #fsTimerDisplay .gradient-card { padding: 1.95rem 2.6rem; }
#fullscreenOverlay #fsTimerDisplay .gradient-number { font-size: 7.8rem; }

#fullscreenOverlay #fsTimerDisplay .timer-label { font-size: 1.56rem; margin-top: 0.98rem; }

.fs-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 2.6rem;
    text-align: center;
}

@media (max-width: 640px) {
    #fullscreenOverlay #fsTimerDisplay {
        flex-direction: column;
        align-items: center;
    }
    #fullscreenOverlay #fsTimerDisplay .digital-block .timer-card { padding: 1.5rem 1.8rem; }
    #fullscreenOverlay #fsTimerDisplay .digital-block .timer-number { font-size: 5.25rem; }
    #fullscreenOverlay #fsTimerDisplay .timer-sep { display: none; }
    #fullscreenOverlay #fsTimerDisplay .analog-ring { width: 210px; height: 210px; }
    #fullscreenOverlay #fsTimerDisplay .ring-value { font-size: 3rem; }
    #fullscreenOverlay #fsTimerDisplay .min-num { font-size: 7.5rem; }
    #fullscreenOverlay #fsTimerDisplay .min-unit { font-size: 3rem; }
    #fullscreenOverlay #fsTimerDisplay .neon-card { padding: 1.5rem 1.8rem; }
    #fullscreenOverlay #fsTimerDisplay .neon-number { font-size: 5.25rem; }
    #fullscreenOverlay #fsTimerDisplay .neon-sep { display: none; }
    #fullscreenOverlay #fsTimerDisplay .flip-card { width: 135px; height: 158px; font-size: 4.5rem; }
    #fullscreenOverlay #fsTimerDisplay .flip-overlay { font-size: 4.5rem; }
    #fullscreenOverlay #fsTimerDisplay .gradient-card { padding: 1.5rem 1.8rem; }
    #fullscreenOverlay #fsTimerDisplay .gradient-number { font-size: 5.25rem; }
    #fullscreenOverlay #fsTimerDisplay .timer-label { font-size: 1.25rem; }
    #fullscreenOverlay #fsTimerDisplay .timer-minimalist {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== Footer ===== */
footer {
    border-top-color: hsl(var(--border));
}

footer .gradient-text {
    font-size: 24px;
    font-weight: 700;
}

/* ================================================================
   TOOL GRID (team.php)
   ================================================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
}

.tool-item {
    display: flex;
    flex-direction: column;
}

.tool-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: hsl(var(--muted-foreground));
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Content Section Backgrounds ===== */
section[class*="bg-white"],
section.bg-white {
    background: hsl(var(--background)) !important;
}

/* ===== General Dark Overrides ===== */
.text-white\/80 { color: rgba(255,255,255,0.8); }
.text-white\/50 { color: rgba(255,255,255,0.5); }
.text-white\/60 { color: rgba(255,255,255,0.6); }

/* ===== Collapse nav text colors ===== */
.collapse-nav a,
.collapse-nav a:visited {
    color: #d1d5db;
}

.collapse-nav a:hover {
    color: hsl(var(--purple));
}

.border-t.border-gray-200 {
    border-color: hsl(var(--border)) !important;
}

/* ================================================================
   RESPONSIVE — Timer Layout
   ================================================================ */
.hero-header {
    padding-top: 160px;
}

@media (max-width: 640px) {
    .hero-header {
        padding-top: 80px;
    }
    .hero-header h1 {
        font-size: 2.44rem;
        height: 6.1rem;
        overflow: hidden;
    }
    #timerCore {
        padding-top: 1rem;
    }
    .digital-block .timer-number { font-size: 2.7rem; }
    .digital-block .timer-card { min-width: 80px; padding: 0.75rem 1rem; }
    .timer-sep { font-size: 2.25rem; }
    .ring-value { font-size: 1.65rem; }
    .min-num { font-size: 3.75rem; }
    .min-unit { font-size: 1.5rem; }
    .neon-card { min-width: 80px; padding: 0.75rem 1rem; }
    .neon-number { font-size: 2.7rem; }
    .flip-card { width: 110px; height: 130px; }
    .flip-overlay { font-size: 3rem; }
    .gradient-card { min-width: 80px; padding: 0.75rem 1rem; }
    .gradient-number { font-size: 2.7rem; }
    .mode-tabs {
        flex-direction: column;
        width: 100%;
    }
    .mode-tab + .mode-tab {
        border-left: none;
        border-top: 1px solid hsl(var(--border));
    }
}

@media (max-width: 480px) {
    .dur-manual {
        flex-wrap: wrap;
        justify-content: center;
    }
    .dur-manual .dur-manual-input {
        width: 120px;
    }
    .dur-manual .field-label {
        white-space: normal;
    }
}
