body {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2em;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    position: relative;
    z-index: 1;
    margin-top: 160px; /* Increased to accommodate fixed elements */
    margin-bottom: 60px;
    padding-top: 20px;
    height: calc(100vh - 220px); /* Adjusted height to account for fixed elements */
    overflow-y: auto;
    width: 90%;
    max-width: 400px;
    border: 1px solid #ccc;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.time-selector-row, .time-zone-row, .menu-bar {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.menu-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8); /* Changed to semi-transparent */
    backdrop-filter: blur(5px); /* Added blur effect for better readability */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.btn {
    font-size: 1em;
    padding: 5px 10px;
    margin: 0 5px;
}

.time-selector-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.time-input-container {
    display: flex;
    align-items: center;
}

.time-input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8em;
    width: 150px;
    margin-right: 10px;
}

.date-input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    width: 100px;
}

#select-main-timezone-btn {
    white-space: nowrap;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    z-index: 1000;
}

.hidden {
    display: none;
}

.suggestions {
    margin-top: 10px;
}

.suggestion {
    padding: 5px;
    cursor: pointer;
}

.suggestion:hover {
    background-color: #f0f0f0;
}

.time-zone-row {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.row-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: transform 0.3s ease;
}

.time-zone-row .left-column {
    text-align: left;
    flex-grow: 1;
}

.time-zone-row .right-column {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.time-zone-row .city-name {
    font-weight: bold;
    font-size: 1.1em;
}

.time-zone-row .time {
    color: #000;
    font-size: 1.2em;
    font-weight: bold;
}

.time-zone-row .date {
    color: #666;
    font-size: 0.9em;
    display: block;
    text-align: right;
    margin-top: 2px;
}

.time-zone-row .time-diff,
.time-zone-row .utc-offset,
.time-zone-row .dst,
.time-zone-row .day-diff {
    font-size: 0.9em;
    color: #666;
}

.title-row {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1003;
    background-color: #fff;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 2px solid #ddd;
    display: flex;
    justify-content: center;
}

.title-row h1 {
    margin: 0;
    font-size: 1.8em;
    color: #333;
    max-width: 400px;
    width: 90%;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Switch styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.market-status {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-top: 5px;
}

.main-timezone-display {
    font-size: 0.8em; /* Decreased from 1.1em */
    color: #1d1d1d;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
    padding: 5px;
    border-radius: 5px;
}

.time-selector-container {
    position: fixed;
    top: 60px; /* Adjust based on the height of your title row */
    left: 0;
    width: 100%;
    z-index: 1002;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.time-selector-row {
    max-width: 400px;
    width: 90%;
    padding: 0;
    margin: 0 auto;
}

.time-input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.6em;
    width: 140px;
}

.main-timezone-display {
    font-size: 0.85em;
    color: #666;
}

.swap-timezone {
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.8em;
    color: blue;
    text-decoration: underline;
    display: block;
}

.swap-timezone:hover {
    opacity: 0.7;
}

/* Swipe-to-Remove Functionality Styles */
.remove-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background-color: #ff4d4d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    text-align: center;
    font-weight: bold;
}

.time-zone-row.swiped .remove-btn {
    transform: translateX(0);
}

.time-zone-row.swiped .row-content {
    transform: translateX(-80px);
}

#market-hours-row .remove-btn {
    display: none;
}

#timezone-modal .modal-content input[type="text"] {
    font-size: 1.2em;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Mobile-specific styles */
@media only screen and (max-width: 600px) {
    .title-row, .menu-bar {
        position: fixed;
        left: 0;
        width: 100%;
        z-index: 1001;
        background-color: #fff;
    }

    .title-row {
        top: 0;
    }

    .menu-bar {
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.8); /* Ensure consistency on mobile */
        backdrop-filter: blur(5px); /* Added blur effect for mobile as well */
    }

    .time-selector-row {
        border-bottom: none;
    }

    .container {
        margin-top: 160px; /* Increased to ensure it's below the time selector */
        height: calc(100vh - 220px); /* Adjusted to account for increased top margin */
        width: 90%; /* Adjusted to match the title and time selector */
        max-width: 400px;
        padding: 10px; /* Reduced padding */
        box-sizing: border-box; /* Ensure padding is included in width */
    }

    .time-selector-container {
        top: 70px; /* Ensure it's below the title row */
    }

    .title-row, .time-selector-container, .container {
        width: 100%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .time-selector-row {
        padding: 0 10px;
    }

    .main-timezone-display {
        font-size: 0.75em; /* Decreased from 1em */
        margin-top: 3px;
    }

    .time-zone-row {
        margin-bottom: 10px;
        padding-bottom: 5px;
        width: 100%; /* Ensure full width within container */
    }

    .time-zone-row .city-name {
        font-size: 1em;
    }

    .time-zone-row .time {
        font-size: 1.1em;
    }

    .time-zone-row .day-diff,
    .time-zone-row .time-diff,
    .time-zone-row .utc-offset,
    .time-zone-row .dst,
    .time-zone-row .date {
        font-size: 0.8em;
        margin-top: 1px;
    }

    #market-hours-row .market-status {
        font-size: 0.8em;
        padding: 1px 3px;
        margin-top: 2px;
    }

    .remove-btn {
        width: 60px;
    }

    .time-zone-row.swiped .row-content {
        transform: translateX(-60px);
    }

    .time-selector-container {
        justify-content: flex-start;
    }

    .time-selector-row {
        padding: 0 10px 0 20px;
        max-width: none;
    }
}

/* Specific styles for the NYSE row */
#market-hours-row .market-status {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-top: 5px;
}

#market-hours-row .right-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#market-hours-row .time {
    font-size: 1.2em;
    font-weight: bold;
}

#market-hours-row .day-diff {
    font-size: 0.9em;
    color: #666;
}