/* ========== 全局 ========== */
.redeem-page {
    flex: 1;
    padding-top: 120px;
    padding-bottom: 60px;
}
.redeem-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- 卡片网格 ---- */
.redeem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.redeem-grid > .card {
    height: 100%;
}
.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.card-title {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: #3A2A1A;
}
.input-hint {
    font-size: 12px;
    color: #7A6A5A;
    margin-bottom: 16px;
    text-align: left;
    padding-left: 4px;
}
.info-hint {
    font-size: 12px;
    color: #B71C1C;
    background: rgba(244, 67, 54, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}
.input-group {
    margin-bottom: 16px;
}
.input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(139, 69, 19, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s;
}
.input-group input:focus {
    outline: none;
    border-color: #6B9AC4;
    background: white;
    box-shadow: 0 0 0 3px rgba(107, 154, 196, 0.15);
}
.input-group input:disabled {
    background: rgba(200, 200, 200, 0.4);
    cursor: not-allowed;
}
.input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}
.input-row input,
.input-row select {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid rgba(139, 69, 19, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s;
}
.input-row input:focus,
.input-row select:focus {
    outline: none;
    border-color: #6B9AC4;
    background: white;
    box-shadow: 0 0 0 3px rgba(107, 154, 196, 0.15);
}
.code-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(139, 69, 19, 0.25);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #3A2A1A;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.code-btn:hover:not(:disabled) {
    background: white;
    border-color: #6B9AC4;
}
.code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(139, 69, 19, 0.25);
    border-radius: 12px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #3A2A1A;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    box-sizing: border-box;
}
.btn:hover:not(:disabled) {
    background: white;
    border-color: #6B9AC4;
    transform: translateY(-1px);
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.error-tip {
    margin-top: 12px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid #f44336;
    color: #c62828;
    font-size: 14px;
    text-align: center;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.15);
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    font-size: 16px;
    font-weight: 500;
    color: #3A2A1A;
}
.info-value {
    font-size: 18px;
    font-weight: 600;
    color: #1A2A3A;
}

/* 邀请玩家折叠 */
.info-invite-row {
    cursor: pointer;
    user-select: none;
}
.info-invite-row:hover {
    background: rgba(107, 154, 196, 0.06);
    margin: 0 -8px;
    padding: 12px 8px;
    border-radius: 8px;
}
.invite-count {
    font-weight: 400;
    color: #7A6A5A;
    font-size: 14px;
}
.invite-arrow {
    font-size: 12px;
    color: #7A6A5A;
    transition: transform 0.2s;
}
.invite-list {
    overflow: hidden;
}
.invite-list-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0 4px;
}
.invite-tag {
    display: inline-block;
    background: rgba(107, 154, 196, 0.12);
    color: #1A2A3A;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
.invite-empty {
    color: #7A6A5A;
    font-size: 13px;
    padding: 4px 0;
}

.exchange-hint {
    font-size: 13px;
    color: #7A6A5A;
    text-align: center;
    margin-bottom: 15px;
}
.result-msg {
    margin-top: 12px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
}
.result-msg.success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid #4caf50;
    color: #2e7d32;
}
.result-msg.error {
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid #f44336;
    color: #c62828;
}
.logout-btn {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
    color: #c62828;
}
.logout-btn:hover {
    background: rgba(244, 67, 54, 0.25);
    border-color: #f44336;
}
.hidden {
    display: none;
}
.title-divider {
    margin: 12px 0 16px 0;
    border: none;
    height: 1px;
    background: rgba(139, 69, 19, 0.2);
}

/* ========== 排行榜参与开关 ========== */
.lb-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}
.lb-toggle-row:last-of-type {
    border-bottom: none;
}
.lb-toggle-label {
    font-size: 15px;
    font-weight: 500;
    color: #3A2A1A;
}
.lb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.lb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.lb-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: all 0.25s ease;
}
.lb-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.lb-switch input:checked + .lb-slider {
    background: #6B9AC4;
}
.lb-switch input:checked + .lb-slider::before {
    transform: translateX(20px);
}
.lb-switch input:disabled + .lb-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .redeem-grid {
        grid-template-columns: 1fr;
    }
    .redeem-container {
        max-width: 500px;
    }
}

@media (max-width: 480px) {
    .redeem-container {
        padding: 0 10px;
    }
    .card {
        padding: 20px;
        border-radius: 16px;
    }
    .card-title {
        font-size: 20px;
    }
    .input-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .input-row input,
    .input-row select,
    .input-row .code-btn {
        width: 100% !important;
        flex: none !important;
        box-sizing: border-box;
    }
    .code-btn {
        margin-top: 0;
    }
    input, select, button, textarea {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .footer .container {
        padding: 0 10px;
    }
    .footer .footer-custom-grid {
        gap: 15px;
        padding: 0;
    }
    .footer .footer-custom-col {
        min-width: 0;
    }
    .footer .footer-legal-original {
        padding: 0 10px;
    }
}

@media (max-width: 360px) {
    .card {
        padding: 15px;
    }
    .card-title {
        font-size: 18px;
    }
    .info-label {
        font-size: 14px;
    }
    .info-value {
        font-size: 16px;
    }
    .exchange-hint {
        font-size: 12px;
    }
}
