/* 用户兑换页面样式 */

@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;500;600;700;900&display=swap');

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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);

    --bg-main: #0b0f1a;
    --bg-surface: #13192b;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-heavy: rgba(15, 23, 42, 0.85);

    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --text-muted: #64748b;

    --border-glass: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);

    --success: #10b981;
    --danger: #ef4444;

    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0px, transparent 50%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-main);
}

.container {
    max-width: 600px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background-color: var(--bg-glass-heavy);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-desc {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: rgba(0, 0, 0, 0.3);
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
}

.btn-secondary:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
}

.teams-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.team-card {
    background-color: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.team-card.selected {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.team-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.team-info {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.team-info-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.team-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-plus {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.badge-pro {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.actions {
    display: flex;
    gap: 1rem;
}

.actions .btn {
    flex: 1;
}

.result-success {
    text-align: center;
    padding: 2rem 0;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.result-message {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.result-details {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.result-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-glass);
}

.result-detail-item:last-child {
    border-bottom: none;
}

.result-detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.result-detail-value {
    color: var(--text-main);
    font-weight: 600;
}

.result-error {
    text-align: center;
    padding: 2rem 0;
}

.result-error .result-icon {
    color: var(--danger-color);
}

.result-error .result-title {
    color: var(--danger-color);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.toast.show {
    display: block;
}

.toast.success {
    background-color: var(--success-color);
    color: white;
}

.toast.error {
    background-color: var(--danger-color);
    color: white;
}

.toast.info {
    background-color: var(--primary-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .actions {
        flex-direction: column;
    }
}

/* ===== New Year Theme Override ===== */
:root {
    --primary: #bc1f1f;
    --primary-hover: #9f1818;
    --primary-glow: rgba(188, 31, 31, 0.34);
    --primary-light: #f9d372;

    --bg-main: #fdf6e7;
    --bg-surface: #fffaf0;
    --bg-glass: rgba(255, 251, 245, 0.72);
    --bg-glass-heavy: rgba(255, 251, 241, 0.92);

    --text-main: #311a13;
    --text-dim: #614130;
    --text-muted: #8a6a53;

    --border-glass: rgba(188, 31, 31, 0.16);
    --border-highlight: rgba(188, 31, 31, 0.28);

    --success: #157347;
    --danger: #b42318;
    --danger-color: #b42318;
    --success-color: #157347;
    --primary-color: #bc1f1f;

    --shadow-lg: 0 16px 34px rgba(75, 36, 19, 0.14);
    --shadow-glow: 0 0 0 1px rgba(244, 180, 61, 0.2), 0 8px 24px rgba(188, 31, 31, 0.14);
}

body {
    font-family: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
    background:
        radial-gradient(circle at 12% 14%, rgba(244, 180, 61, 0.28), transparent 34%),
        radial-gradient(circle at 85% 8%, rgba(188, 31, 31, 0.14), transparent 34%),
        repeating-linear-gradient(145deg, rgba(240, 199, 118, 0.11) 0 2px, rgba(253, 246, 231, 0) 2px 8px),
        linear-gradient(180deg, #fff8ea 0%, #f7e8ce 42%, #fff6e4 100%);
    color: var(--text-main);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    top: -30px;
    width: 102px;
    height: 138px;
    border-radius: 54px 54px 40px 40px;
    border: 2px solid rgba(244, 180, 61, 0.82);
    background: linear-gradient(180deg, #cf2c2c 0%, #9d1313 100%);
    opacity: 0.13;
    box-shadow: 0 12px 22px rgba(144, 21, 21, 0.28);
    pointer-events: none;
}

body::before {
    left: 20px;
    animation: floatBadge 6.5s ease-in-out infinite;
}

body::after {
    right: 20px;
    animation: floatBadge 7.4s ease-in-out infinite 0.7s;
}

@keyframes floatBadge {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

.container {
    max-width: 700px;
}

.header h1 {
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    color: #971717;
    letter-spacing: 0.04em;
}

.subtitle {
    color: #855f49;
    font-size: 1rem;
}

.header .spots-badge {
    background: rgba(188, 31, 31, 0.11) !important;
    border: 1px solid rgba(188, 31, 31, 0.26) !important;
    color: #8f1717 !important;
}

.card {
    background: var(--bg-glass-heavy);
    border: 1px solid rgba(188, 31, 31, 0.18);
    box-shadow: var(--shadow-lg);
}

.card h2 {
    color: #8f1717;
    font-size: 1.75rem;
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
    letter-spacing: 0.02em;
}

.step-desc,
.form-group label,
.team-info,
.result-message,
.result-detail-label {
    color: var(--text-dim);
}

.form-help {
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.form-input {
    background: #fffdf9;
    border: 1px solid rgba(188, 31, 31, 0.2);
    color: #3f271a;
}

.form-input:focus {
    border-color: #bc1f1f;
    box-shadow: 0 0 0 3px rgba(188, 31, 31, 0.16);
    background: #fff9f0;
}

.btn {
    border-radius: 12px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(120deg, #bc1f1f 0%, #d84b1f 65%, #f0ac2f 100%);
    border: 1px solid rgba(255, 235, 194, 0.35);
    color: #fff8ea;
    box-shadow: 0 8px 18px rgba(188, 31, 31, 0.22);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 12px 22px rgba(188, 31, 31, 0.25);
}

.btn-secondary {
    background: linear-gradient(180deg, #fff8e8 0%, #f8ecd3 100%);
    border: 1px solid rgba(188, 31, 31, 0.18);
    color: #6f452f;
}

.team-card {
    background: rgba(255, 250, 242, 0.88);
    border: 1px solid rgba(188, 31, 31, 0.18);
}

.team-card:hover {
    background: rgba(255, 244, 226, 0.95);
    border-color: rgba(188, 31, 31, 0.3);
    box-shadow: var(--shadow-glow);
}

.team-card.selected {
    background: rgba(188, 31, 31, 0.1);
    border-color: #bc1f1f;
}

.team-name,
.result-title,
.result-detail-value {
    color: #8f1717;
}

.badge-plus {
    background: rgba(188, 31, 31, 0.14);
    color: #9f1818;
}

.badge-pro {
    background: rgba(244, 180, 61, 0.22);
    color: #915a13;
}

.result-details {
    background: rgba(255, 249, 240, 0.92);
    border: 1px solid rgba(188, 31, 31, 0.16);
}

.result-detail-item {
    border-bottom: 1px solid rgba(188, 31, 31, 0.12);
}

.toast.success {
    background-color: rgba(21, 115, 71, 0.94);
}

.toast.error {
    background-color: rgba(180, 35, 24, 0.94);
}

.toast.info {
    background-color: rgba(188, 31, 31, 0.92);
}

.header,
.card {
    animation: riseUpIn 0.65s ease both;
}

.step.active {
    animation: riseUpIn 0.38s ease;
}

@keyframes riseUpIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    body::before,
    body::after {
        width: 74px;
        height: 102px;
        opacity: 0.09;
    }

    .container {
        max-width: 100%;
    }

    .card {
        padding: 1.6rem 1.2rem;
    }
}
