/* User Redeem Page Design System */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft: #eef2ff;
    --accent: #8b5cf6;
    --accent-soft: #f3e8ff;

    --bg-main: #eef2ff;
    --bg-surface: rgba(255, 255, 255, 0.94);

    --text-main: #0f172a;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --text-secondary: #64748b;
    --text-dim: #94a3b8;

    --border-base: rgba(226, 232, 240, 0.9);

    --success: #10b981;
    --success-soft: #ecfdf5;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --info: #3b82f6;
    --info-soft: #eff6ff;

    --shadow-sm: 0 8px 18px -16px rgba(15, 23, 42, 0.16);
    --shadow-md: 0 18px 36px -26px rgba(15, 23, 42, 0.22);
    --shadow-lg: 0 30px 60px -34px rgba(15, 23, 42, 0.3);

    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --transition-base: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    position: relative;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 22%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 42%, #e2e8f0 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    line-height: 1.6;
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    filter: blur(70px);
    pointer-events: none;
    opacity: 0.45;
}

body::before {
    width: 280px;
    height: 280px;
    top: 5%;
    left: -60px;
    background: rgba(99, 102, 241, 0.25);
}

body::after {
    width: 240px;
    height: 240px;
    right: -40px;
    bottom: 12%;
    background: rgba(139, 92, 246, 0.22);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 560px;
    width: 100%;
}

.header {
    position: relative;
    overflow: hidden;
    text-align: center;
    margin-bottom: 1.4rem;
    padding: 1.6rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.82));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.header::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.35), transparent);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.header h1 {
    font-size: 2.3rem;
    font-weight: 900;
    letter-spacing: -0.055em;
    color: var(--text-main);
    margin-bottom: 0.6rem;
}

.subtitle {
    max-width: 430px;
    margin: 0 auto;
    font-size: 1rem;
    color: var(--text-muted);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.spots-badge,
.hero-tip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
}

.spots-badge {
    color: var(--primary);
}

.hero-tip {
    color: var(--text-muted);
}

.card {
    position: relative;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    animation: slideUp 0.45s ease-out;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

.card h2 {
    font-size: 1.32rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.03em;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition-base);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

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

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.feature-item {
    padding: 0.85rem 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(248, 250, 252, 0.85);
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

.btn {
    width: 100%;
    min-height: 50px;
    padding: 0.82rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 18px 28px -20px rgba(79, 70, 229, 0.75);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(203, 213, 225, 0.9);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: white;
    border-color: rgba(99, 102, 241, 0.2);
}

/* Toast */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.95rem 1.2rem;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(226, 232, 240, 0.95);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(-24px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-base);
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
}

.warranty-section {
    margin-top: 2rem;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.warranty-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.warranty-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.06rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.warranty-description {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.warranty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: fit-content;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-full);
    background: var(--warning-soft);
    color: #b45309;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

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

.actions .btn {
    flex: 1;
}

.teams-list {
    display: grid;
    gap: 0.9rem;
}

.team-card,
.record-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.88);
    transition: var(--transition-base);
}

.team-card:hover,
.record-card:hover {
    border-color: rgba(99, 102, 241, 0.24);
    box-shadow: var(--shadow-md);
}

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

.team-name {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.team-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.team-info-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.team-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.36rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.badge-error {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-warranty,
.badge-plus {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.badge-normal,
.badge-pro {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-muted);
}

/* Result */
.result-success,
.result-error,
.result-info {
    text-align: center;
}

.result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 1.2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
}

.result-title {
    font-size: 1.55rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
}

.result-message {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    line-height: 1.75;
}

.result-details {
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.result-detail-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.82rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

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

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

.result-detail-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
}

.warranty-view {
    text-align: left;
}

.warranty-summary {
    border-radius: 18px;
}

.records-section h4 {
    color: var(--text-main);
}

.spinning {
    animation: spin 0.9s linear infinite;
}

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

/* Mobile Responsiveness */
@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .header {
        padding: 1.2rem 1rem;
        border-radius: 22px;
    }

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

    .subtitle {
        font-size: 0.94rem;
    }

    .card {
        padding: 1.35rem;
        border-radius: 22px;
    }

    .feature-list,
    .team-info {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }

    .result-title {
        font-size: 1.28rem;
    }

    .result-detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
