body {
    margin: 0;
    min-height: 100vh;
    background: #14171c;
    color: #f2f2f2;
    font-family: system-ui, sans-serif;
}

main {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

.site-title {
    text-align: center;
    margin: 28px 0 0;
    font-size: 26px;
    letter-spacing: 0.3px;
}

.lang-switch {
    position: fixed;
    top: 16px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 1001;
}

.lang-switch__item {
    width: 32px;
    height: 22px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    opacity: 0.55;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.lang-switch__item svg {
    display: block;
    width: 100%;
    height: 100%;
}

.lang-switch__item:hover {
    opacity: 0.85;
}

.lang-switch__item[aria-pressed="true"] {
    opacity: 1;
    border-color: #3fa9f5;
}

.mod-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    margin-top: 20px;
    border-top: 1px solid #262b33;
    border-bottom: 1px solid #262b33;
}

.mod-links__item {
    padding: 8px 16px;
    border-radius: 999px;
    background: #1f232b;
    border: 1px solid #2c313a;
    color: #f2f2f2;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.mod-links__item:hover {
    background: #2c313a;
    border-color: #3a4048;
}

.gift-claim {
    position: fixed;
    right: 20px;
    bottom: 25%;
    display: flex;
    align-items: center;
    background: #ff424d;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(255, 66, 77, 0.45);
    animation: gift-claim-in 0.4s ease-out;
    z-index: 1000;
}

.gift-claim__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.gift-claim:hover .gift-claim__link {
    transform: translateY(-2px);
}

.gift-claim__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.gift-claim__close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #1a1200;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes gift-claim-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#challenge-form-section,
#challenge-view-section,
#challenge-lobby-section {
    background: #1b1f26;
    border: 1px solid #2c313a;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

#challenge-form,
#challenge-view-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

#challenge-form label,
#challenge-view-form label {
    font-size: 13px;
    font-weight: 600;
    color: #a9b0bb;
}

#challenge-form input,
#challenge-form select,
#challenge-view-form input {
    background: #14171c;
    border: 1px solid #2c313a;
    border-radius: 6px;
    color: #f2f2f2;
    padding: 8px 10px;
    font-size: 14px;
}

#challenge-form button,
#challenge-view-form button,
#challenge-start-button {
    margin-top: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #3fa9f5;
    color: #0c1116;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

#challenge-form button:hover,
#challenge-view-form button:hover,
#challenge-start-button:not(:disabled):hover {
    background: #63bcf7;
}

#challenge-start-button:disabled {
    background: #2c313a;
    color: #7a828d;
    cursor: default;
}

.challenge-hint {
    color: #7a828d;
    font-size: 13px;
    margin: 6px 0 0;
}

.challenge-delete-button {
    display: block;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid #ff6b6b;
    border-radius: 6px;
    background: none;
    color: #ff6b6b;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.challenge-delete-button:hover {
    background: rgba(255, 107, 107, 0.1);
}

.challenge-delete-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.challenge-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
}

.challenge-hash-wrap {
    position: relative;
    display: inline-block;
    margin: 8px 0 20px;
}

.challenge-hash {
    display: inline-block;
    font-family: ui-monospace, monospace;
    font-size: 28px;
    letter-spacing: 4px;
    background: #14171c;
    border: 1px dashed #3fa9f5;
    border-radius: 8px;
    padding: 10px 18px;
    color: #3fa9f5;
    cursor: pointer;
}

.challenge-hash-toast {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #3fa9f5;
    color: #0c1116;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    animation: hash-toast-in 0.15s ease-out;
}

@keyframes hash-toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.challenge-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    margin: 4px 0 20px;
    font-size: 14px;
}

.challenge-details dt {
    color: #7a828d;
}

.challenge-details dd {
    margin: 0;
    text-align: right;
}

#challenge-players {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

#challenge-players li {
    padding: 6px 10px;
    background: #14171c;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 14px;
}

#challenge-empty-state {
    color: #7a828d;
    font-size: 14px;
}

#challenge-status {
    margin-top: 20px;
    font-size: 14px;
}
