:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    /* Enhanced Vibrancy */
    --accent-est: #0ea5e9;
    /* Sky Blue 500 */
    --accent-ist: #14b8a6;
    /* Teal 500 */
    --accent-purple: #8b5cf6;
    /* Violet */
    --accent-hot: #f43f5e;
    /* Rose */

    --glass-border: rgba(255, 255, 255, 0.12);
    --glow-est: rgba(14, 165, 233, 0.6);
    --glow-ist: rgba(20, 184, 166, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

/* Clocks Grid */
.live-clocks {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    width: 100%;
}

.add-clock-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 1rem;
}

/* Remove Button */
.remove-clock-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    opacity: 0;
}

.clock-card:hover .remove-clock-btn {
    opacity: 1;
}

.remove-clock-btn:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

/* Converter List Dynamic */
.converter-list {
    display: flex;
    flex-direction: column;
    /* Vertical list for comparison */
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}



.conv-box-dynamic .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100px;
}

.conv-box-dynamic .conv-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.conv-box-dynamic .conv-city {
    font-size: 0.9rem;
    color: var(--text-secondary);
    width: 100px;
    text-align: right;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Centering might need shift for sidebar */
    overflow-x: hidden;
    position: relative;
    padding: 2rem;
}

/* Background Blobs for Ambient Glow (Restored) */
.background-blobs {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-est);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-ist);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: #6366f1;
    /* Indigo */
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

/* App Layout Grid for Sidebar */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    /* Main Content + Sidebar */
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    align-items: start;
    z-index: 1;
}

.container {
    width: 100%;
    /* Restore max-width to prevent huge cards */
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Sidebar Styles */
.sidebar {
    background: rgba(15, 23, 42, 0.4);
    border-left: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    height: 100%;
    max-height: 90vh;
    /* Scrollable if many pairs */
    overflow-y: auto;
    position: sticky;
    top: 2rem;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.saved-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-state {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    margin-top: 2rem;
}

.saved-pair-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.saved-pair-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.saved-pair-card:active {
    transform: scale(0.98);
}

.saved-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.saved-zone {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Saved Groups Simplified & Compacted */
.saved-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.saved-pair-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    padding: 0.5rem 0.5rem;
    /* Drastically reduced padding */
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.saved-pair-card:last-child {
    border-bottom: none;
}

.saved-pair-card::before {
    display: none;
    /* No sweep effect */
}

.saved-pair-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    /* No movement */
    padding-left: 0.75rem;
    /* Subtle shift */
    border-radius: 6px;
    /* Slight rounded on hover */
    border-color: transparent;
    /* Hide separator on hover */
}

.saved-mini-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    /* Fixed width for Time column */
    align-items: center;
    gap: 1.5rem;
    padding: 3px 0;
    width: 100%;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    /* Optional guide line for "uniformity" */
}

.saved-mini-row:last-child {
    border-bottom: none;
}

.saved-time-mini {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Outfit', monospace;
    /* Ensure numbers line up */
    font-size: 0.9rem;
    text-align: left;
    /* Align time to the left of its box */
}

.saved-city-mini {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.delete-pair {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    padding: 6px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saved-pair-card:hover .delete-pair {
    opacity: 1;
}

.delete-pair:hover {
    background: #ef4444;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.7;
}

.saved-pair-card:hover .delete-pair {
    opacity: 1;
    transform: translateX(0);
}

.delete-pair:hover {
    background: #ef4444;
    color: white;
}

/* Header & Save Button */
header {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.header-actions {
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Chrome-Style Flash Fill Button */
.icon-button {
    background: transparent;
    border: 1px solid var(--accent-est);
    color: var(--accent-est);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Smooth return to normal */
    transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        color 0.3s,
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover: Subtle Tint + Bounce */
.icon-button:hover {
    background: rgba(14, 165, 233, 0.1);
    transform: scale(1.05);
    /* Pop up slightly */
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

/* Active/Press: INSTANT Solid Fill + Shrink */
.icon-button:active {
    background: var(--accent-est);
    color: white;
    transform: scale(0.9);
    /* Snappy shrink */
    border-color: transparent;
    /* Instant transition for "Fast Response" feel */
    transition: all 0.05s ease-out;
}

/* Ensure SVG inherits color instantly */
.icon-button:active svg {
    fill: white;
    /* Optional: If clicking "fills" the icon like a star */
    stroke: white;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    margin-bottom: 0;
}

header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
}

/* Live Clocks Enhanced (Compacted) */
.live-clocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Smaller min-width */
    gap: 1.5rem;
    /* Reduced gap */
    width: 100%;
}

.clock-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(8px);
    /* Reduced blur for crispness */
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    /* Smaller radius */
    padding: 1.5rem 1rem;
    /* Significantly reduced padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Lighter shadow */
}

/* Remove Button - Fixed Z-Index */
.remove-clock-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    opacity: 0;
    z-index: 100;
    /* Ensure it's above everything */
}

.clock-card:hover .remove-clock-btn {
    opacity: 1;
}

.remove-clock-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: rotate(90deg);
}

/* Clock Card - No Top Edge */
.clock-card::before {
    display: none;
    /* Removed completely as requested */
}

.clock-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.7);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    /* Compact margin */
    z-index: 2;
}

.zone-select {
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    /* Smaller padding */
    padding-right: 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    /* Smaller font */
    font-weight: 500;
    outline: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.zone-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

.time-display {
    font-size: 3rem;
    /* Reduced from 4.5rem */
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
    color: #fff;
    letter-spacing: -1px;
    z-index: 2;
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
    z-index: 2;
}

.offset-display {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 10px;
    border-radius: 12px;
    z-index: 2;
}

/* Converter Section Sync - Clean & Compact */
.converter-section {
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    /* Reduced padding */
    text-align: center;
    box-shadow: none;
    /* Cleaner */
}

.converter-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
}

.converter-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Converter List Compact */
.converter-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Removing gap, relying on padding/borders for clean list look */
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    /* Center horizontally */
    margin-bottom: 2rem;
    /* Specific bottom margin */
}



.conv-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.conv-box-dynamic .label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    color: var(--text-secondary);
    /* Neutral color */
}

.conv-box-dynamic .conv-time {
    font-size: 1.5rem;
    /* Smaller */
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: none;
}

.icon-exchange {
    font-size: 1.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.slider-container {
    padding: 0 1rem;
    position: relative;
}

.time-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transition: transform 0.1s;
}

.time-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Copy Display Box - Removed (Reverted) */

/* Fix Dropdown Colors */
/* Ensure options have a dark background so white text is visible */
.zone-select option {
    background-color: #0f172a !important;
    /* Force dark background */
    color: #ffffff !important;
    /* Force white text */
    padding: 10px;
}

/* Fallback for select itself to ensure contrast */
.zone-select {
    background-color: rgba(15, 23, 42, 0.4);
    color: #ffffff;
}

/* Dynamic Converter Box - Grid Layout for Maximum Space */
.conv-box-dynamic {
    display: grid;
    grid-template-columns: 1fr auto auto;
    /* City | Date | Time */
    gap: 1rem;
    /* Reduce gap to give more space to City */
    /* Huge column gap */
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    padding-left: 3.5rem;
    /* Increased space to clear button */
    /* Space for left-side button */
    padding-right: 1rem;
    align-items: center;
    margin-bottom: 0px;
    transition: all 0.2s ease;
    position: relative;
    /* Validation for absolute children */
}

.conv-box-dynamic:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 2.25rem;
    /* Slide effect */
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.conv-box-dynamic.dropdown-active {
    z-index: 100;
    background: rgba(30, 41, 59, 0.8);
    /* Slightly more opaque when active */
}

/* Grid Cell 1: City */
.conv-left {
    display: flex;
    flex-direction: column;
    /* Stack name and badge vertically */
    justify-content: center;
    align-items: flex-end;
    /* Align date/time to right */
    min-width: 0;
    /* Critical for truncation */
    flex: 1;
    /* Take available space */
    /* Take available space */
    margin-right: 1.5rem;
    /* Gap before Date/Time */
    /* REMOVED overflow: hidden to allow dropdowns to spill out */
    /* position: relative; REMOVED so button sees conv-box parent */
}

.conv-right {
    /* Grid Cell 2 & 3: Date & Time */
    /* Wait, HTML struct is [Left: Label] [Right: Date + Input] */
    /* We need to use CSS Grid on the container to split them if possible, 
       but the HTML structure groups Date+Input in .conv-right.
       So let's keep the HTML structure but make .conv-right a Grid/Flex with strict gaps.
    */
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* Reduced gap from 2.5rem */
    /* Massive gap between Date and Time */
    grid-column: 2 / -1;
    /* Span if needed, or just occupy space */
}

.conv-left .label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.conv-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-start;
    /* Force left alignment */
    width: 100%;
    /* Ensure full width availability */
}

/* Custom Dropdown UI */
.custom-dropdown {
    position: relative;
    width: 100%;
    /* Keep width manageable */
    max-width: 100%;
    /* Allow taking full available width of the 1fr column */
    min-width: 0;
    /* Enable flex shrinkage */
    display: flex;
    /* Allow trigger inside to behave correctly */
}

.dropdown-trigger {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    /* Smaller font to fit one line */
    font-weight: 500;
    padding: 0;
    padding-right: 20px;
    cursor: pointer;
    width: auto;
    max-width: 100%;
    white-space: normal;
    /* Allow wrapping */
    line-height: 1.2;
    overflow: visible;
    /* Show all text */
    text-align: left;
    position: relative;
    opacity: 0.9;
    transition: opacity 0.2s;
    display: block;
    max-width: 100%;
    /* Fully flexible width */
}

/* Cleaned up orphaned block */

.dropdown-trigger::after {
    content: '';
    position: absolute;
    right: 0;
    top: 55%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.dropdown-trigger:hover {
    opacity: 1;
}

.dropdown-trigger:hover::after {
    opacity: 1;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    width: 340px;
    /* Wider than trigger */
    max-height: 300px;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    z-index: 1000;
    backdrop-filter: blur(20px);
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-menu.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Box */
.dropdown-search-box {
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.dropdown-search-input:focus {
    border-color: var(--accent-est);
    background: rgba(0, 0, 0, 0.5);
}

/* Items List */
.dropdown-items {
    overflow-y: auto;
    flex: 1;
    padding: 6px;
}

.dropdown-items::-webkit-scrollbar {
    width: 6px;
}

.dropdown-items::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.dropdown-item {
    padding: 10px 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.1s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-item.selected {
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent-est);
    font-weight: 500;
}

/* Offset Badge - Pill Style */
.offset-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent-est);
    background: rgba(14, 165, 233, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
    /* Space from city name */
}

/* Mini Remove Button - Hidden until Hover */
.remove-clock-mini {
    background: rgba(255, 255, 255, 0.1);
    /* Visible background */
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    /* Visible but subtle */
    position: absolute;
    left: 8px;
    /* Extreme top left */
    top: 12px;
    /* Top aligned */
    transform: none;
    /* No vertical center */
    z-index: 20;
    transition: all 0.2s ease;
}

.conv-box-dynamic:hover .remove-clock-mini {
    opacity: 1;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Conflicting rule removed */

.remove-clock-mini:hover {
    background: #ef4444 !important;
    color: white !important;
    opacity: 1 !important;
}

/* Consolidated hover styles above */

.conv-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
    /* Prevent shrinking time/date */
}

.conv-right .date-hint {
    display: block;
    font-size: 0.95rem;
    /* Larger, readable text */
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: auto;
    /* Let it flow naturally */
    text-align: right;
    font-weight: 500;
    opacity: 0.9;
    padding-right: 2.5rem;
    /* Space for separator */
    position: relative;
    background: transparent;
    /* Ensure no badge look */
}

/* Vertical Separator - taller and more distinct */
.conv-right .date-hint::after {
    content: '';
    position: absolute;
    right: 1.25rem;
    /* Center in the 2.5rem gap */
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

/* Integrated Time Input - Seamless Style */
.time-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.conv-time-input {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--accent-est) !important;
    color: var(--accent-est) !important;
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    /* Adjusted smaller */
    font-weight: 600;
    padding: 0px 4px;
    border-radius: 8px;
    outline: none;
    cursor: ns-resize;
    /* Hint at scrolling */
    text-align: center;
    width: auto;
    transition: all 0.2s ease;
    color-scheme: dark;
}

.conv-time-input:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
    transform: scale(1.05);
    /* Interactive pop */
}

.conv-time-input:focus {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid var(--accent-est) !important;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
    cursor: text;
}

.flash-update {
    animation: flashInput 0.5s ease;
}

@keyframes flashInput {
    0% {
        color: #fff;
        text-shadow: 0 0 10px #fff;
        transform: scale(1.1);
    }

    100% {
        color: var(--accent-est);
        text-shadow: none;
        transform: scale(1);
    }
}

/* Fix for Webkit browsers */
::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0;
    /* Hide icon unless hovered? Or make it subtle */
    width: 0;
    /* Hide icon completely for text-only look */
    height: 0;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
}

.glow-button {
    background: linear-gradient(135deg, var(--accent-est), #0ea5e9);
    border: none;
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    transition: all 0.3s ease;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}

/* Reset Container & Scheduler Spacing Fix - Aggressive */
.scheduler-actions {
    margin-bottom: 2.5rem;
    /* Ensure GAP between Copy button and Reset Button */
    margin-top: 1rem;
}

.reset-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    /* TIGHT gap between button and text */
    margin-top: 0;
    /* Handled by scheduler-actions bottom margin */
    padding-top: 0;
    border-top: none;
    width: 100%;
}

#reset-btn {
    margin-bottom: 0px;
    /* Ensure no extra margin */
}

#diff-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.9;
    padding: 2px 0;
}

.flash-highlight {
    animation: flashText 1s ease;
}

@keyframes flashText {
    0% {
        color: var(--accent-est);
        transform: scale(1);
    }

    50% {
        color: #fff;
        transform: scale(1.1);
    }

    100% {
        color: var(--text-primary);
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .live-clocks {
        grid-template-columns: 1fr;
    }

    .time-comparison {
        flex-direction: column;
        gap: 1rem;
    }

    .icon-exchange {
        transform: rotate(90deg);
    }

    .conv-box {
        width: 100%;
    }
}

/* Collapsible Sidebar Styles */

/* Modify App Layout to handle collapse */
.app-layout {
    display: grid;
    /* Main content takes remaining space, sidebar is auto-sized based on state */
    grid-template-columns: 1fr auto;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    align-items: start;
    z-index: 1;
    /* transition: none; - Removed layout animation completely */
}

.sidebar {
    background: rgba(15, 23, 42, 0.4);
    border-left: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    height: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: 2rem;
    width: 340px;
    /* Fixed width when expanded */
    transition: width 0.15s ease-out, padding 0.15s ease-out;
    /* Ultra fast, almost instant */
}

/* Collapsed State - Small Floating Button */
.sidebar.collapsed {
    width: 170px;
    /* Fixed width for smooth transition (approx button size) */
    height: auto;
    /* Not full height */
    min-height: 0;
    padding: 0;
    overflow: visible;
    /* Allow transforms */
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    display: block;
    /* Reset flex/grid */
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    /* Don't stretch */
    box-shadow: none;
    z-index: 100;
    /* Ensure visible on top */
}

/* Logic: Keep header VISIBLE but strip styles, so button inside it shows */
.sidebar.collapsed .sidebar-header {
    border: none;
    margin: 0;
    padding: 0;
    width: 100%;
    /* Fill the fixed container */
    display: flex;
    /* Center button */
    justify-content: flex-end;
    /* Align right or center? Let's keep Right aligned */
}

/* Hide Title & List ONLY */
.sidebar.collapsed h2,
.sidebar.collapsed .saved-list {
    display: none !important;
}

/* Transform toggle button into the main "Open" Trigger */
.sidebar.collapsed #toggle-sidebar {
    position: relative;
    width: 100%;
    /* Fill the 170px container */
    height: 48px;
    background: rgba(15, 23, 42, 0.8);
    /* Darker for visibility */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center content */
    gap: 0.75rem;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* Stronger shadow */
    pointer-events: auto;
    /* Re-enable clicks */
    white-space: nowrap;
    transition: background 0.2s;
    /* Only color transition, no size/move */
}

/* Add text label to the button */
.sidebar.collapsed #toggle-sidebar::after {
    content: 'Favorites';
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Add icon to the button */
.sidebar.collapsed #toggle-sidebar::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    /* Search/Star Icon shape */
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3e%3c/polygon%3e%3c/svg%3e") no-repeat center;
    mask: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3e%3c/polygon%3e%3c/svg%3e") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Hover State - No Movement */
.sidebar.collapsed #toggle-sidebar:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--accent-est);
    transform: none;
    /* No scale or move */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* Keep shadow static */
    color: #fff;
}

/* Ensure inner chevron is hidden in this mode */
.sidebar.collapsed .icon-chevron {
    display: none;
}

/* Expanded State Toggle - Keep Standard */
#toggle-sidebar {
    /* Standard button inside header when open */
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

#toggle-sidebar:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Chevron Rotation Logic */
.icon-chevron {
    transition: transform 0.3s ease;
}

.sidebar.collapsed .icon-chevron {
    transform: rotate(180deg);
    /* Points right/open */
}

/* Clean up empty rule */
.small-icon {
    /* Intentionally empty - classes use utility structure */
}

.small-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Footer Styling */
.app-footer {
    width: 100%;
    max-width: 800px;
    margin: 4rem auto 2rem auto;
    text-align: center;
    padding: 0 1rem;
}

.footer-glass {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.footer-glass h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--accent-est);
}

.footer-dot {
    color: rgba(255, 255, 255, 0.1);
}

.copyright {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

/* Icon Buttons (Share, Save) */
.icon-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.icon-button.success {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    animation: toast-in 0.3s forwards;
    pointer-events: auto;
}

.toast.success {
    border-color: var(--accent-ist);
    color: var(--accent-ist);
}

.toast.success span {
    color: #fff;
}

.toast.error {
    border-color: var(--accent-hot);
    color: var(--accent-hot);
}

.toast.error span {
    color: #fff;
}

.toast.fade-out {
    animation: toast-out 0.3s forwards;
}

@keyframes toast-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Entry Animations */
@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
.about-section {
    width: 100%;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-primary);
}

.about-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.about-intro strong {
    color: #fff;
    font-weight: 600;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.about-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
        /* Less padding on mobile edges */
    }

    .app-layout {
        grid-template-columns: 1fr;
        /* Stack sidebar and content */
        gap: 1.5rem;
        /* Increased gap for breathing room */
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    .container {
        width: 100%;
        padding: 0 0.5rem;
    }

    /* Converter Box - Stack Vertically & Spacing */
    .conv-box-dynamic {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 1rem;
        /* More space between rows */
        padding: 1.5rem 1rem;
        /* More internal padding */
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        /* Ensure padding doesn't overflow width */
    }

    .conv-left {
        width: 100%;
        margin-right: 0;
        align-items: center;
        /* Center align city */
        margin-bottom: 0.5rem;
    }

    .conv-left .dropdown-trigger {
        font-size: 1.1rem;
        /* Slightly smaller for mobile fitting */
        max-width: 100%;
        white-space: normal;
        /* Allow wrapping if needed */
    }

    .conv-right {
        width: 100%;
        justify-content: center;
        /* Center align inputs */
        flex-direction: column;
        /* Stack Date above Time */
        gap: 1rem;
        /* Clear separation */
    }

    .conv-right .date-hint {
        padding-right: 0;
        text-align: center;
        font-size: 0.9rem;
    }

    .conv-right .date-hint::after {
        display: none;
        /* Hide separator in vertical mode */
    }

    /* Touch Targets */
    .icon-button {
        padding: 14px 20px;
        /* even larger target */
        width: 100%;
        justify-content: center;
        font-size: 1rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    /* Sidebar - Full width when open */
    .sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        max-height: 60vh;
        /* Allow more height */
        border-radius: 20px 20px 0 0;
        z-index: 999;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
        /* Strong shadow to separate */
    }

    .sidebar.collapsed {
        top: 1rem;
        bottom: auto;
        width: auto;
        left: 1rem;
        background: rgba(15, 23, 42, 0.95);
        /* Simpler bg for performance */
        backdrop-filter: none;
        /* Remove heavy blur on mobile button */
    }

    h1 {
        font-size: 2rem;
        /* Keep it manageable */
        word-wrap: break-word;
        /* Prevent overflow */
    }

    /* Fix Clock Card Text Cutoff */
    .time-display {
        font-size: 3.5rem;
        /* Large but responsive */
        line-height: 1;
    }

    .clock-card {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
    }

    .zone-select {
        max-width: 100%;
        /* Ensure dropdown doesn't overflow card */
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        font-size: 1rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    /* Reduce heavy effects for smoothness */
    .background-blobs .blob {
        filter: blur(60px);
        /* Reduce blur radius load */
        opacity: 0.3;
        /* Reduce opacity */
    }

    /* --- Mobile UX Improvements --- */

    /* Sticky Slider for easy access while scrolling */
    .slider-container {
        position: sticky;
        bottom: 20px;
        /* Float slightly above bottom */
        z-index: 100;
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 15px;
        border: 1px solid var(--glass-border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        margin-top: 1rem;
    }

    /* Prevent iOS auto-zoom on inputs */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Larger touch target for remove button */
    .remove-clock-mini {
        padding: 12px;
        font-size: 1.5rem;
        opacity: 1;
        /* Always visible on mobile */
    }
}

/* --- SEO & Content Section --- */
.seo-section {
    margin-top: 4rem;
    padding: 3rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* --- SEO Accordion --- */
.seo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: opacity 0.3s ease;
}

.seo-header:hover {
    opacity: 0.8;
}

.seo-section h2 {
    font-size: 2rem;
    margin-bottom: 0;
    /* Remove bottom margin as header handles it */
    text-align: center;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    pointer-events: none;
    /* Let clicks pass to header */
}

.seo-chevron {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

/* Rotate chevron when expanded (default is collapsed state in logic, but let's assume valid state) */
.seo-header[aria-expanded="true"] .seo-chevron {
    transform: rotate(180deg);
}

.seo-content {
    max-height: 2000px;
    /* Arbitrary large height for transition */
    opacity: 1;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.seo-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    /* Collapse margins */
}

.seo-block {
    margin-bottom: 3rem;
}

.seo-block:last-child {
    margin-bottom: 0;
}

.seo-block h3 {
    font-size: 1.25rem;
    color: var(--accent-est);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-block p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.seo-block ul {
    list-style: none;
    padding-left: 0;
}

.seo-block ul li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.seo-block ul li::before {
    content: "•";
    color: var(--accent-ist);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .seo-section {
        padding: 1.5rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }
}