/* ============================================
   GPT Team Redeem — v2 Redesign
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft: #eef2ff;
    --primary-ring: rgba(99, 102, 241, 0.25);
    --accent: #8b5cf6;

    --bg-main: #f8fafc;
    --bg-surface: #ffffff;

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

    --border-base: #e2e8f0;

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

    --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition-fast: 150ms ease;
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -40%;
    right: -20%;
    width: 70%;
    height: 80%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -15%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

/* Header */

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

.header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    color: #94a3b8;
}

.spots-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.15);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-top: 10px;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Card */

.card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: 0 25px 50px rgb(0 0 0 / 0.2), 0 0 0 1px rgba(255,255,255,0.05);
    animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), #ec4899);
}

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

.card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.015em;
    color: var(--text-main);
}

/* Forms */

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-base);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
    background: var(--bg-surface);
    color: var(--text-main);
}

.form-input::placeholder { color: var(--text-dim); }
.form-input:hover { border-color: var(--text-dim); }

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

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
    line-height: 1.5;
}

/* Buttons */

.btn {
    width: 100%;
    padding: 0.8125rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 15px rgb(99 102 241 / 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgb(99 102 241 / 0.4);
}

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

.btn-secondary {
    background-color: var(--bg-main);
    color: var(--text-main);
    border: 1.5px solid var(--border-base);
}

.btn-secondary:hover {
    background-color: var(--bg-surface);
    border-color: var(--text-dim);
}

.btn-xs {
    width: auto;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* Toast */

.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-base);
    display: none;
    z-index: 200;
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 360px;
    animation: toastIn 0.3s ease-out;
}

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

.toast.show { display: flex; align-items: center; gap: 0.625rem; }
.toast.success { border-left: 4px solid var(--success); }
.toast.success i, .toast.success svg { color: var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.error i, .toast.error svg { color: var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }
.toast.warning { border-left: 4px solid var(--warning); }

/* Steps */

.step { display: none; }
.step.active { display: block; }

/* Results */

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

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

.result-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

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

.result-details {
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 0.25rem 1rem;
    text-align: left;
    margin-bottom: 2rem;
    border: 1px solid var(--border-base);
}

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

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

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

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

/* Warranty Section */

.warranty-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-base);
}

.warranty-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success  { background: var(--success-soft); color: var(--success); }
.badge-error    { background: var(--danger-soft);  color: var(--danger); }
.badge-warranty { background: var(--primary); color: white; }
.badge-normal   { background: var(--bg-main); color: var(--text-muted); border: 1px solid var(--border-base); }

.spinning { animation: spin 1s linear infinite; }
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Actions */

.actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.actions .btn { flex: 1; }

/* Mobile */

@media (max-width: 480px) {
    body {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .header { margin-bottom: 1.5rem; }
    .header h1 { font-size: 1.75rem; }

    .card { padding: 1.5rem; }

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

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