/* 用户兑换页面样式 - 简洁现代设计 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    
    --gradient-start: #a855f7;
    --gradient-mid: #6366f1;
    --gradient-end: #ec4899;

    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;

    --bg-white: #ffffff;
    --bg-gray: #f9fafb;

    --border-light: #e5e7eb;
    --border-focus: #a5b4fc;

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

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* 渐变背景 */
    background: linear-gradient(135deg, 
        #a855f7 0%, 
        #6366f1 25%, 
        #8b5cf6 50%, 
        #6366f1 75%, 
        #ec4899 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 添加一些动态光效 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* 剩余车位徽章 */
.spots-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.spots-badge svg {
    width: 16px;
    height: 16px;
}

/* 步骤动画 */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片样式 - 白色简洁风格 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-2xl);
    position: relative;
    overflow: hidden;
}

.card h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    text-align: center;
}

.step-desc {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

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

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-help {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-gray);
    line-height: 1.5;
}

/* 按钮样式 */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.4);
    margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.5);
}

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

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

.btn-secondary {
    background: var(--bg-gray);
    border: 2px solid var(--border-light);
    color: var(--text-dark);
}

.btn-secondary:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Team 列表 */
.teams-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.team-card {
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-card:hover {
    border-color: var(--primary-light);
    background: #f0f0ff;
}

.team-card.selected {
    background: #eef2ff;
    border-color: var(--primary);
}

.team-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

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

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

.team-info-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

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

.badge-plus {
    background: #eef2ff;
    color: var(--primary);
}

.badge-pro {
    background: #faf5ff;
    color: #a855f7;
}

/* 操作按钮组 */
.actions {
    display: flex;
    gap: 0.75rem;
}

.actions .btn {
    flex: 1;
}

/* 结果页面 */
.result-success {
    text-align: center;
    padding: 1.5rem 0;
}

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

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

.result-message {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.result-details {
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.result-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.result-detail-item:first-child {
    padding-top: 0;
}

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

.result-detail-value {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

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

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

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

/* Toast 提示 */
.toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    font-weight: 500;
    font-size: 0.9rem;
    max-width: 90%;
}

.toast.show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: toastSlide 0.3s ease-out;
}

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

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

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

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 640px) {
    body {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .header {
        margin-bottom: 1.5rem;
    }

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

    .card {
        padding: 1.75rem;
        border-radius: var(--radius-lg);
    }

    .card h2 {
        font-size: 1.5rem;
    }

    .form-input {
        padding: 0.75rem 0.875rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
    }

    .actions {
        flex-direction: column;
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
