.active-zones {
    text-align: center;
    order: 1;
}

.active-zones h4 {
    margin-bottom: 15px;
}

#activeZones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

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

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.timezone-widget {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0e010b, #11010e, #140110, #160212, #190214, #1b0215, #1d0217, #200319, #22031b, #24031c, #27031e, #290320);
    color: #E5FCFF;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

.header p {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    opacity: 0.9;
}

.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.controls {
    background: rgba(229,252,255,0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    order: 2;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: start;
}

.current-time-section {
    background: rgba(229,252,255,0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    order: 1;
}

.timezone-selector {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
    order: 2;
}

/* Base form elements */
select, 
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

select {
    background: #E5FCFF !important;
    color: #0E010B;
    width: clamp(220px, 25vw, 400px);
    border: 1px solid rgba(177, 1, 140, 0.3);
}

select:focus {
    outline: none;
    border: 1px solid #2A0020;
    box-shadow: 0 0 5px rgba(42, 0, 32, 0.3);
}

/* Primary buttons */
.btn {
    background: linear-gradient(135deg, #38042b, #38042b, #38042b, #38042b, #38042b, #38042b, #3b042e, #420533, #490538, #50063e, #570643, #5e0749);
    color: #E5FCFF !important;
    /*font-weight: 600;*/
    border: none;
}

.btn:hover {
    background: #13161a;
    color: #B1018C !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 0, 129, 0.4);
}

.btn:focus {
    outline: none;
    border: 1px solid #4A0236;
    box-shadow: 0 0 5px rgba(74, 2, 54, 0.3);
}

/* Remove button - specific styling that overrides primary button */
.timezone-chip .remove-zone {
    background: none;
    color: #E5FCFF;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    width: auto;
    height: auto;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, transform 0.15s ease;
    padding: 2px;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.timezone-chip .remove-zone:hover {
    color: #B1018C;
    background: none;
    transform: scale(1.3);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    box-shadow: none;
}

.timezone-chip .remove-zone:focus {
    outline: none;
    background: none;
    box-shadow: none;
}

.timezone-chip .remove-zone:active {
    background: none;
    box-shadow: none;
}

.current-time-section h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    text-align: center;
}

.current-times {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.current-time-item {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* Time period color classes for current time cards */
.current-time-item.night {
    background: linear-gradient(135deg, #684c8f, #55386b, #3f2649, #2f1a33, #251226, #1c081a);
}

.current-time-item.early-morning {
    background: linear-gradient(135deg, #55386b, #53487d, #50598e, #4b699b, #429ac6, #45cde0, #75ffea);
}

.current-time-item.morning {
    background: linear-gradient(135deg, #00a0b4, #00a0b4, #00afb1, #20c997);
}

.current-time-item.afternoon {
    background: linear-gradient(135deg, #127d82, #158b90, #19999f, #1ca7ae, #499fc9, #8092cc, #a985b8);
}

.current-time-item.evening {
    background: linear-gradient(135deg, #7f6c9e, #7d639e, #7d599e, #7d4e9d, #7d429a, #793b98, #703896, #663694, #5c3391, #52318f);
}

.current-time-item.late-night {
    background: linear-gradient(135deg, #341e3a, #2c172f, #231124, #1c081a, #180716, #130512, #0d040c);
}

.current-time-item .zone-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.current-time-item .time {
    font-size: 1.6rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.current-time-item .date {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* Timeline improvements */
.timeline-wrapper {
    background: rgba(229,252,255,0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    width: 100%;
    overflow: hidden;
}

.timeline-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    /* Modern scrollbar styling */
    scrollbar-color: #470234 #10010d;
    scrollbar-width: auto;
}

/* Webkit scrollbar styling */
.timeline-container::-webkit-scrollbar {
    height: 16px;
}

.timeline-container::-webkit-scrollbar-track {
    background: #10010d;
    border-radius: 8px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: #470234;
    border-radius: 8px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #5a0340;
}

.timeline-header {
    display: flex;
    margin-bottom: 10px;
    min-width: fit-content;
    position: relative;
}

.location-header-cell {
    background: linear-gradient(90deg, #0e010b, #13010f, #180213, #1c0216);
    color: #E5FCFF;
    padding: 10px 15px;
    font-weight: 600;
    text-align: center;
    border-radius: 0 8px 8px 0;
    font-size: 1.4rem;
    width: 180px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 0 12px rgba(0,0,0,0.3);
    line-height: 1.1;
    flex-shrink: 0;
    margin-right: 2px;
    position: sticky;
    left: 0;
    z-index: 20;
}

.time-headers {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.hour-header {
    background: rgba(229,252,255,0.2);
    padding: 12px 4px;
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.4rem;
    color: #E5FCFF;
    width: 80px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timezone-row {
    display: flex;
    margin-bottom: 2px;
    min-width: fit-content;
    position: relative;
}

.location-cell {
    background: linear-gradient(90deg, #0e010b, #13010f, #180213, #1c0216);
    color: #E5FCFF;
    padding: 15px;
    /*font-weight: 600;*/
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 72px;
    border-radius: 0 5px 5px 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-right: 2px;
    position: sticky;
    left: 0;
    z-index: 15;
}

.time-cells {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.time-cell {
    padding: 8px 4px;
    text-align: center;
    border-radius: 5px;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 70px;
    flex-shrink: 0;
}

.time-cell:hover {
    transform: scale(1.05);
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.time-top {
    font-weight: 600;
    font-size: 1.5rem;
}

.time-day {
    font-size: 1.3rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* Time period color coding */

.time-cell.early-morning { 
    background: linear-gradient(135deg, #55386b, #53487d, #50598e, #4b699b, #429ac6, #45cde0, #75ffea); 
    color: #E5FCFF; 
}

.time-cell.morning { 
    background: linear-gradient(135deg, #00a0b4, #00a0b4, #00afb1, #20c997); 
    color: #E5FCFF; 
}

.time-cell.afternoon { 
    background: linear-gradient(135deg, #127d82, #158b90, #19999f, #1ca7ae, #499fc9, #8092cc, #a985b8); 
    color: #E5FCFF; 
}

.time-cell.evening { 
    background: linear-gradient(135deg, #7f6c9e, #7d639e, #7d599e, #7d4e9d, #7d429a, #793b98, #703896, #663694, #5c3391, #52318f); 
    color: #E5FCFF; 
}

.time-cell.night { 
    background: linear-gradient(135deg, #684c8f, #55386b, #3f2649, #2f1a33, #251226, #1c081a); 
    color: #E5FCFF; 
}

.time-cell.late-night { 
    background: linear-gradient(135deg, #341e3a, #2c172f, #231124, #1c081a, #180716, #130512, #0d040c); 
    color: #E5FCFF; 
}

/* Business hours highlight */
.time-cell.business-hours {
    border: 2px solid #f3feff;
}

.time-cell.current-hour {
    border: 3px solid #FF8601;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 134, 1, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(51, 56, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(51, 56, 255, 0); }
}

.timezone-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(229,252,255,0.2);
    padding: 8px 12px;
    border-radius: 20px;
    margin: 5px;
    font-size: 1.4rem;
}

.legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: rgba(229,252,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-color.legend-current-hour {
    border: 3px solid #FF8601;
    background: transparent;
}

/* Mobile responsive - Smallish Monitor to Tablet Size Screens */
@media (max-width: 1400px) and (min-width: 769px) {
    .top-section {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .current-times {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .timezone-selector {
        grid-template-columns: 1fr 1fr;
    }
    
    .timezone-selector select {
        grid-column: 1 / -1;
        min-width: 100%;
    }
}

/* Tablet Size and Smaller*/
@media (max-width: 768px) {
    .header h1 { font-size: 2rem; }
    .top-section { 
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    .timezone-selector { 
        flex-direction: column; 
        align-items: stretch; 
    }
    .current-times { 
        grid-template-columns: 1fr;
    }
    .legend {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    select {
        min-width: 100%;
    }

    .location-header-cell,
    .location-cell {
        width: 100px;
        font-size: 1.3rem;
        position: static;
    }

    .hour-header {
        width: 65px;
        font-size: 1.5rem;
    }
    
    .time-cell {
        width: 65px;
        font-size: 1rem;
    }
    
    .time-top {
        font-size: 1.3rem;
    }
    
    .time-day {
        font-size: 1.1rem;
    }
}