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

:root {
    --bg: #090d10;
    --panel: #10171b;
    --panel-soft: #141e23;
    --line: #26383f;
    --line-strong: #2f5d61;
    --text: #edf7f5;
    --muted: #8fa2a2;
    --dim: #607274;
    --accent: #43d6c3;
    --accent-soft: rgba(67, 214, 195, 0.12);
    --warning: #e7bc6b;
    --error: #ff7f7f;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(67, 214, 195, 0.08), transparent 42%),
        radial-gradient(circle at 50% 0, rgba(231, 188, 107, 0.12), transparent 34%),
        var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    width: 100%;
    max-width: 640px;
    padding: 32px;
    background: rgba(16, 23, 27, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

h1 {
    margin-bottom: 8px;
    color: var(--text);
    text-align: center;
    font-size: 2rem;
    letter-spacing: 0;
}

.subtitle {
    margin-bottom: 28px;
    color: var(--muted);
    text-align: center;
    font-size: 1rem;
}

.input-group {
    margin-top: 22px;
}

label {
    display: block;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
}

.server-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.server-option {
    position: relative;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.server-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.server-option span {
    display: block;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
}

.server-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
}

.time-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.time-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.time-separator {
    color: var(--dim);
    font-size: 2rem;
    font-weight: 700;
}

.time-label {
    color: var(--dim);
    font-size: 0.75rem;
    font-weight: 700;
}

input[type="text"] {
    width: 82px;
    padding: 14px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    background: #0b1114;
    color: var(--text);
    font-family: "Courier New", monospace;
    font-size: 1.7rem;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(67, 214, 195, 0.14);
}

input[type="text"]::placeholder {
    color: #3f5053;
}

button {
    width: 100%;
    margin-top: 28px;
    padding: 15px 18px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: #142629;
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

button:hover {
    background: #193134;
    border-color: #62ead8;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.result-box {
    display: none;
    margin-top: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d1417;
}

.result-box.show {
    display: block;
}

.result-list {
    display: grid;
    gap: 12px;
}

.result-item {
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: var(--panel);
}

.result-label {
    margin-bottom: 8px;
    color: var(--warning);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.result-value {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 1.45rem;
    font-weight: 800;
}

.result-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: "Courier New", monospace;
    font-size: 0.95rem;
}

.event-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 6px;
    object-fit: cover;
}

.error {
    display: none;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid rgba(255, 127, 127, 0.35);
    border-radius: 8px;
    background: rgba(255, 127, 127, 0.1);
    color: var(--error);
    text-align: center;
}

.error.show {
    display: block;
}

.info-box {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(20, 30, 35, 0.72);
}

.info-box h3 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 0.95rem;
}

.info-box ul {
    list-style: none;
    color: var(--muted);
}

.info-box li {
    position: relative;
    margin-bottom: 6px;
    padding-left: 18px;
}

.info-box li::before {
    content: "";
    position: absolute;
    top: 0.62em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.footer {
    margin-top: 24px;
    color: var(--dim);
    text-align: center;
    font-size: 0.85rem;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: transparent;
    color: var(--accent);
}

.copy-btn:hover {
    background: var(--accent-soft);
    transform: none;
}

.copy-icon {
    stroke: currentColor;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 800;
}

.page-btn:hover:not(:disabled),
.page-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    transform: none;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.arrow-btn {
    font-size: 1.3rem;
    line-height: 1;
}

@media (max-width: 520px) {
    body {
        align-items: flex-start;
        padding: 14px;
    }

    .container {
        padding: 22px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .server-options {
        grid-template-columns: 1fr;
    }

    .time-inputs {
        gap: 7px;
    }

    input[type="text"] {
        width: 66px;
        font-size: 1.35rem;
    }

    .time-separator {
        font-size: 1.45rem;
    }

    .result-time {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .pagination {
        gap: 6px;
    }

    .page-btn {
        width: 34px;
        height: 34px;
    }
}
