*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f4f4;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
}

a {
    color: #2a77d4;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
}

.lang-ru [data-lang="en"],
.lang-en [data-lang="ru"] {
    visibility: hidden;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.container {
    width: 100%;
    padding: 0 12px;
    margin: 0 auto;
}

.stub-card,
.error-card {
    width: 500px;
    height: 150px;
    margin: 100px auto 0;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #e9e9e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-card {
    font-size: 18px;
    font-weight: 400;
    color: #333;
}

.game-card {
    max-width: 1080px;
    margin-top: 100px;
    margin-bottom: 60px;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #e9e9e9;
    overflow: hidden;
}

.game-header {
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.game-title {
    font-size: 30px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 15px 10px 15px 0;
    margin: 0;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.lang-switch {
    display: flex;
    flex-shrink: 0;
}

.lang-btn {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 0;
    padding: 8px 14px;
    font-size: 16px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
}

.lang-btn:first-child {
    border-radius: 10px 0 0 10px;
}

.lang-btn:last-child {
    border-radius: 0 10px 10px 0;
}

.lang-btn:not(.active):hover {
    background: #e9e9e9;
    font-weight: 700;
}

.lang-switch:hover .lang-btn.active:not(:hover) {
    background: #fff;
    font-weight: 400;
}

.lang-btn.active {
    background: #e9e9e9;
    color: #000;
    font-weight: 700;
}

.game-content {
    display: flex;
}

.game-img-wrap {
    flex-shrink: 0;
    width: 460px;
    min-height: 215px;
}

.game-img {
    width: 100%;
    height: auto;
    display: block;
}

.info-list-wrap {
    flex-grow: 1;
    overflow: hidden;
}

.info-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-top: 1px solid #e9e9e9;
    border-bottom: 1px solid #e9e9e9;
}

.info-box {
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #333;
    padding: 0 10px;
    white-space: nowrap;
    border-bottom: 1px solid #e9e9e9;
}

.info-box:last-child {
    border-bottom: none;
}

.info-box .info-label {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 800;
    margin-right: 8px;
}

.info-box a,
.info-box span:not(.info-label):not(.info-value-badge):not(.copy-toast) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.info-value-badge {
    background: #e9e9e9;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: default;
}

.bot-placeholder {
    display: inline-block;
    width: 120px;
    height: 18px;
    background: #e9e9e9;
    border-radius: 4px;
    vertical-align: middle;
    animation: placeholder-pulse 2s ease-in-out infinite;
}

.profile-placeholder {
    display: inline-block;
    width: 240px;
    height: 18px;
    background: #e9e9e9;
    border-radius: 4px;
    vertical-align: middle;
    animation: placeholder-pulse 2s ease-in-out infinite;
}

@keyframes placeholder-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.copy-btn {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 3px 6px;
    margin-left: 8px;
    cursor: pointer;
    color: #666;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.copy-toast {
    font-size: 13px;
    color: #999;
    font-weight: 700;
    margin-left: 6px;
    opacity: 0;
    transition: opacity 0.3s;
}

.copy-toast.show {
    opacity: 1;
}

.copy-btn:hover {
    background: #e9e9e9;
    color: #333;
}

.profile-link {
    font-size: 16px;
}

.status-section {
    padding: 22px 10px 15px;
}

.status-label {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.status-box {
    border-radius: 5px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 800;
    color: #333;
}

.status-box.status-green {
    background: #e5ffe3;
    border: 1px solid #0dbf00;
}

.status-box.status-red {
    background: #ffe5e5;
    border: 1px solid #d40000;
}

.status-box.status-gray {
    background: #f0f0f0;
    border: 1px solid #707070;
}

.input-section {
    padding: 15px 10px 15px;
}

.input-label {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.input-wrap {
    display: flex;
    gap: 8px;
}

.input-field {
    flex-grow: 1;
    min-width: 0;
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #abadb3;
    border-radius: 5px;
    outline: none;
    color: #333;
    transition: background 0.3s, border-color 0.3s;
}

.input-field:focus {
    border-color: #aaa;
}

.input-field.input-error {
    background: #ffe5e5;
    border-color: #d40000;
}

.input-btn {
    flex-shrink: 0;
    width: 270px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    background: #f0f0f0;
    border: 1px solid #abadb3;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.input-btn:hover {
    background: #e5e5e5;
}

.help-section {
    padding: 15px 10px 15px;
}

.help-label {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.help-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.contact-section {
    padding: 15px 10px 15px;
}

.contact-label {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.contact-box {
    display: flex;
    gap: 0.5rem;
}

.contact-telegram,
.contact-plati,
.contact-ggsel {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 400;
}

@media (max-width: 1120px) {
    .game-card {
        margin-top: 60px;
    }

    .stub-card,
    .error-card {
        margin-top: 60px;
    }
}

@media (max-width: 767px) {
    .stub-card,
    .error-card {
        width: calc(100% - 24px);
        max-width: 500px;
        height: 120px;
        margin-top: 10px;
        border-radius: 10px;
    }

    .error-card {
        font-size: 15px;
    }

    .game-card {
        margin-top: 10px;
        margin-bottom: 10px;
        border-radius: 10px;
    }

    .game-header {
        padding: 0 8px;
    }

    .game-title {
        font-size: 16px;
        padding: 14px 5px 14px 0;
    }

    .lang-btn {
        font-size: 13px;
        padding: 6px 8px;
    }

    .game-content {
        flex-direction: column;
    }

    .game-img-wrap {
        width: 100%;
        min-height: auto;
    }

    .game-img {
        border-radius: 0;
        margin-bottom: 6px;
    }

    .info-list {
        border: none;
        border-bottom: 1px solid #e9e9e9;
    }

    .info-box {
        font-size: 13px;
        padding: 0 8px;
        min-height: 38px;
    }

    .info-box .info-label {
        font-size: 14px;
        margin-right: 5px;
    }

    .profile-link {
        font-size: 13px;
    }

    .info-value-badge {
        font-size: 13px;
        padding: 1px 6px;
        border-radius: 4px;
    }

    .copy-btn {
        padding: 2px 4px;
        margin-left: 5px;
    }

    .copy-toast {
        display: none;
    }

    .copy-btn svg {
        width: 13px;
        height: 13px;
    }

    .status-section,
    .input-section,
    .help-section {
        padding: 10px 8px;
    }

    .help-label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .help-text {
        font-size: 13px;
    }

    .input-label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .input-wrap {
        flex-direction: column;
    }

    .input-field {
        padding: 8px 10px;
        font-size: 14px;
    }

    .input-btn {
        width: auto;
        padding: 8px 14px;
        font-size: 13px;
    }

    .status-label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .status-box {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 6px;
        line-height: 1.4;
    }

    .contact-section {
        padding: 5px 8px 14px;
    }

    .contact-label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .contact-telegram,
    .contact-plati,
    .contact-ggsel {
        font-size: 13px;
    }

    .contact-telegram svg,
    .contact-plati img,
    .contact-ggsel img {
        width: 26px;
        height: 26px;
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none;
}
