@font-face {
    font-family: 'Share Tech Mono';
    src: url('./ShareTechMono.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --bar-bg: #dddddd;
    --modal-bg: rgba(255, 255, 255, 0.95);
    --modal-border: #000000;
}

body.dark-mode {
    --bg-color: #000000;
    --text-color: #ffffff;
    --bar-bg: #333333;
    --modal-bg: rgba(0, 0, 0, 0.95);
    --modal-border: #ffffff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.time-text {
    font-family: 'Share Tech Mono', Consolas, 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
}

header {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.label {
    font-size: 1.8rem;
    font-weight: bold;
}

.small-clock {
    font-size: 2rem;
}

.timezone-sup {
    font-family: 'Share Tech Mono', Consolas, monospace;
    font-size: 1rem;
    font-weight: bold;
    opacity: 0.8;
    transform: translateY(-5px);
}

.top-right {
    display: flex;
    gap: 15px;
}

button {
    background: none;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: inherit;
    transition: transform 0.2s;
}

button:hover {
    transform: scale(1.05);
}

.center-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
}

#main-title {
    font-size: 4.5rem;
    margin-bottom: 2vh;
    text-align: center;
}

.big-text-container {
    height: 25vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.display-clock {
    font-size: 12vw;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

body.dark-mode .display-clock {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.progress-section {
    width: 100%;
    margin-top: 2vh;
}

.progress-labels-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 30px;
    width: 100%;
}

.progress-labels-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 0 30px;
    width: 100%;
}

.left-text,
.right-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.right-text {
    align-items: flex-end;
}

.left-time {
    display: flex;
    justify-content: flex-start;
}

.right-time {
    display: flex;
    justify-content: flex-end;
}

.medium-clock {
    font-size: 3rem;
}

.progress-bar-container {
    width: 100%;
    height: 60px;
    background-color: var(--bar-bg);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #00ff00;
    transition: width 1s linear, background-color 0.5s;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--modal-bg);
    border: 2px solid var(--modal-border);
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
}

.modal-content h2 {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid var(--modal-border);
    border-radius: 5px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

.color-scheme-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.modal-actions {
    margin-top: 25px;
    text-align: center;
}

.modal-actions button {
    padding: 10px 20px;
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .medium-clock {
        font-size: 2rem;
    }

    .label {
        font-size: 1.4rem;
    }

    .display-clock {
        font-size: 15vw;
    }
}

.legend-container {
    display: flex;
    width: 100%;
    height: 60px;
    background-color: var(--bar-bg);
    margin-bottom: 5vh;
    border-radius: 30px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: opacity 0.3s, height 0.3s, margin-bottom 0.3s, padding 0.3s;
}

.legend-container.hidden {
    opacity: 0;
    height: 0;
    margin-bottom: 0;
    padding: 0;
    pointer-events: none;
}

.legend-segment {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: bold;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    position: relative;
}

.legend-marker {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', Consolas, monospace;
    font-size: 1.2rem;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid var(--text-color);
    z-index: 10;
    white-space: nowrap;
}

#marker-1, #marker-4 {
    font-size: 1.5rem;
}

body.dark-mode .legend-segment {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-segment:last-child {
    border-right: none !important;
}

.empty-segment {
    background-color: var(--bar-bg);
    color: var(--text-color);
}

.passed-segment {
    background-color: var(--bar-bg) !important;
    color: var(--text-color) !important;
}

.green-segment {
    background-color: #00ff00;
    color: #000;
}

.yellow-segment {
    background-color: #ffff00;
    color: #000;
}

.red-segment {
    background-color: #ff0000;
    color: #000;
}

.blue-segment {
    background-color: #00bfff;
    color: #000;
}

.cn {
    font-size: 1.2rem;
}

.en {
    font-size: 1.2rem;
}