/* ============================================
   RaffleWheel - Spin The Wheel Styles
   Colorful Light Theme with Animations
   ============================================ */

:root {
    --c-primary: #8b5cf6;
    --c-primary-dark: #7c3aed;
    --c-secondary: #ec4899;
    --c-accent: #fbbf24;
    --c-success: #10b981;
    --c-info: #3b82f6;
    --c-bg: #fefefe;
    --c-bg-soft: #faf9ff;
    --c-bg-gradient-1: #fef3ff;
    --c-bg-gradient-2: #fff7ed;
    --c-bg-gradient-3: #f0f9ff;
    --c-text: #1f2937;
    --c-text-soft: #4b5563;
    --c-text-mute: #9ca3af;
    --c-border: #f3f4f6;
    --c-border-strong: #e5e7eb;
    --c-card: #ffffff;
    --shadow-sm: 0 1px 3px rgba(139, 92, 246, 0.06), 0 1px 2px rgba(139, 92, 246, 0.04);
    --shadow-md: 0 4px 16px rgba(139, 92, 246, 0.08), 0 2px 4px rgba(139, 92, 246, 0.05);
    --shadow-lg: 0 20px 50px rgba(139, 92, 246, 0.15), 0 8px 20px rgba(139, 92, 246, 0.08);
    --shadow-xl: 0 30px 80px rgba(139, 92, 246, 0.2);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #fbbf24 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-rainbow: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 25%, #6bcf7f 50%, #4d9fff 75%, #b66bff 100%);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Animated gradient text
   ============================================ */
.gradient-text {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
}

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

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    animation: gradientShift 6s ease infinite;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.7);
    color: var(--c-text);
    border: 2px solid var(--c-border-strong);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    background: white;
    border-color: var(--c-primary);
    color: var(--c-primary);
    transform: translateY(-3px);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 17px;
}

/* ============================================
   SECTION 1: HERO
   ============================================ */
.hero {
    position: relative;
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #fef3ff 0%, #fff7ed 50%, #f0f9ff 100%);
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: floatShape 12s ease-in-out infinite;
}

.shape-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #fbbf24, transparent);
    top: -100px; right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #ec4899, transparent);
    bottom: -150px; left: -100px;
    animation-delay: 2s;
}

.shape-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #8b5cf6, transparent);
    top: 50%; left: 50%;
    animation-delay: 4s;
}

.shape-4 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #3b82f6, transparent);
    top: 20%; right: 30%;
    animation-delay: 6s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.9); }
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: white;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--c-border);
}

.badge-dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--c-text-soft);
    margin-bottom: 36px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 36px;
    padding-top: 140px;
    border-top: 1px solid var(--c-border);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--c-text-mute);
    font-weight: 600;
    margin-top: 4px;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrap {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: floatY 5s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    animation: floatY 4s ease-in-out infinite;
    z-index: 2;
}

.card-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0.5s;
}

.card-2 {
    bottom: 15%;
    right: -8%;
    animation-delay: 1.5s;
}

.card-emoji {
    font-size: 24px;
}

/* ============================================
   Section common
   ============================================ */
.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #fef3ff, #f0f9ff);
    color: var(--c-primary);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid var(--c-border);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--c-text-soft);
}

/* ============================================
   SECTION 2: WHEEL APP
   ============================================ */
.wheel-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
}

.wheel-app {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
    background: white;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--c-border);
}

.wheel-sidebar {
    background: linear-gradient(180deg, #faf9ff, #fef3ff);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--c-border);
}

.sidebar-tabs {
    display: flex;
    gap: 4px;
    background: white;
    padding: 4px;
    border-radius: 100px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition);
}

.tab-btn:hover {
    color: var(--c-text);
}

.tab-btn.active {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    animation: gradientShift 6s ease infinite;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.tab-panel h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.panel-hint {
    font-size: 12px;
    color: var(--c-text-mute);
    margin-bottom: 14px;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 16px;
}

.entries-list::-webkit-scrollbar { width: 6px; }
.entries-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); border-radius: 100px; }
.entries-list::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 100px; }

.entry-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 10px 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    transition: all var(--transition);
}

.entry-row:hover {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-sm);
}

.entry-color {
    width: 22px; height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--c-border);
    transition: transform var(--transition);
}

.entry-color:hover { transform: scale(1.15); }

.entry-input {
    flex: 1;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text);
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.entry-input:focus {
    color: var(--c-primary);
}

.entry-remove {
    width: 26px; height: 26px;
    border-radius: 50%;
    color: var(--c-text-mute);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.entry-remove:hover {
    background: #fee2e2;
    color: #ef4444;
}

.entries-actions {
    display: flex;
    gap: 8px;
}

.btn-secondary {
    flex: 1;
    padding: 10px 14px;
    background: white;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
    transform: translateY(-2px);
}

.btn-ghost-sm {
    background: transparent;
}

.btn-ghost-sm:hover {
    background: var(--c-text-soft);
    color: white;
    border-color: var(--c-text-soft);
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.danger-zone {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--c-border-strong);
}

/* Theme swatches */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.theme-swatch {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--c-border);
    transition: all var(--transition);
    cursor: pointer;
}

.theme-swatch:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 2px var(--c-primary);
}

.theme-swatch.active {
    box-shadow: 0 0 0 3px var(--c-primary);
    transform: scale(1.05);
}

.text-input {
    width: 100%;
    padding: 10px 14px;
    background: white;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text);
    font-weight: 600;
    outline: none;
    transition: all var(--transition);
}

.text-input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Settings rows */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
    font-weight: 600;
}

.setting-row:last-of-type {
    border-bottom: none;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: var(--c-border-strong);
    border-radius: 100px;
    transition: var(--transition);
    cursor: pointer;
}

.slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: var(--c-primary);
}

input:checked + .slider::before {
    transform: translateX(20px);
}

/* Wheel stage */
.wheel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    min-height: 580px;
}

.wheel-pointer {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: pointerBounce 2s ease-in-out infinite;
}

@keyframes pointerBounce {
    0%, 100% { transform: translateX(-50%) rotate(180deg) translateY(0); }
    50% { transform: translateX(-50%) rotate(180deg) translateY(-4px); }
}

.wheel-container {
    position: relative;
    width: min(520px, 100%);
    aspect-ratio: 1;
    margin-bottom: 32px;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow:
        0 0 0 12px white,
        0 0 0 16px rgba(139, 92, 246, 0.3),
        0 30px 60px rgba(139, 92, 246, 0.4),
        0 0 80px rgba(236, 72, 153, 0.2);
    transition: filter 0.3s;
}

.wheel-container.spinning #wheel-canvas {
    filter: brightness(1.05);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: var(--c-text);
    box-shadow:
        0 0 0 6px rgba(255,255,255,0.5),
        0 8px 24px rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 5;
    letter-spacing: 0.05em;
}

.wheel-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spin-btn {
    position: relative;
    padding: 18px 56px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.1em;
    color: white;
    overflow: hidden;
    transition: all var(--transition);
}

.spin-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.spin-btn-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    z-index: 0;
}

.spin-btn-text {
    position: relative;
    z-index: 1;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.5);
}

.spin-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.last-result {
    font-size: 14px;
    color: var(--c-text-mute);
    font-weight: 600;
    min-height: 20px;
    text-align: center;
}

.last-result strong {
    color: var(--c-primary);
    font-weight: 800;
}

/* ============================================
   SECTION 3: TEMPLATES
   ============================================ */
.templates-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #faf9ff 0%, #fff7ed 50%, #f0f9ff 100%);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.template-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--c-border);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-color, var(--gradient-primary));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
}

.template-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--card-color, var(--c-primary));
}

.template-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--card-color, var(--gradient-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transition: transform var(--transition);
}

.template-card:hover .template-icon {
    transform: scale(1.1) rotate(15deg);
}

.template-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.template-desc {
    font-size: 12px;
    color: var(--c-text-mute);
    position: relative;
    z-index: 1;
}

.template-entries {
    margin-top: 12px;
    font-size: 11px;
    color: var(--c-text-mute);
    font-weight: 600;
    position: relative;
    z-index: 1;
    padding-top: 12px;
    border-top: 1px dashed var(--c-border);
}

.templates-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    background: white;
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--c-border);
}

.templates-cta h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.templates-cta p {
    color: var(--c-text-soft);
    margin-bottom: 20px;
    font-size: 1rem;
}

.templates-cta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    padding: 6px 14px;
    background: linear-gradient(135deg, #fef3ff, #f0f9ff);
    color: var(--c-primary);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.templates-cta-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ============================================
   SECTION 4: FEATURES
   ============================================ */
.features-section {
    padding: 100px 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: var(--feature-color, var(--gradient-primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--feature-color-bg, linear-gradient(135deg, #fef3ff, #f0f9ff));
    color: var(--feature-color-text, var(--c-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-8deg);
}

.feature-1 { --feature-color: linear-gradient(90deg, #8b5cf6, #ec4899); --feature-color-bg: linear-gradient(135deg, #fef3ff, #f0f9ff); --feature-color-text: #8b5cf6; }
.feature-2 { --feature-color: linear-gradient(90deg, #fbbf24, #f97316); --feature-color-bg: linear-gradient(135deg, #fff7ed, #fef3c7); --feature-color-text: #f59e0b; }
.feature-3 { --feature-color: linear-gradient(90deg, #3b82f6, #06b6d4); --feature-color-bg: linear-gradient(135deg, #f0f9ff, #cffafe); --feature-color-text: #3b82f6; }
.feature-4 { --feature-color: linear-gradient(90deg, #10b981, #6bcf7f); --feature-color-bg: linear-gradient(135deg, #f0fdf4, #d1fae5); --feature-color-text: #10b981; }
.feature-5 { --feature-color: linear-gradient(90deg, #ec4899, #f43f5e); --feature-color-bg: linear-gradient(135deg, #fff1f2, #ffe4e6); --feature-color-text: #ec4899; }
.feature-6 { --feature-color: linear-gradient(90deg, #6366f1, #8b5cf6); --feature-color-bg: linear-gradient(135deg, #eef2ff, #ede9fe); --feature-color-text: #6366f1; }

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--c-text-soft);
    font-size: 14px;
}

/* ============================================
   SECTION 5: HOW IT WORKS
   ============================================ */
.how-section {
    padding: 100px 0;
    background: linear-gradient(180deg, white 0%, #faf9ff 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-primary), var(--c-secondary), var(--c-accent), transparent);
    z-index: 0;
}

.step-card {
    background: white;
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    z-index: 1;
    border: 1px solid var(--c-border);
    transition: all var(--transition);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.15;
    animation: gradientShift 6s ease infinite;
    line-height: 1;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
    animation: gradientShift 6s ease infinite;
    position: relative;
}

.step-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    z-index: -1;
    animation: pulseRing 2s ease infinite;
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0; }
}

.step-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--c-text-soft);
    font-size: 14px;
}

/* ============================================
   SECTION 6: USE CASES
   ============================================ */
.usecases-section {
    padding: 100px 0;
    background: white;
}

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.usecase-card {
    background: linear-gradient(180deg, white, #faf9ff);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.usecase-card::after {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    transition: opacity var(--transition);
}

.usecase-card:hover {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.usecase-card:hover::after {
    opacity: 0.15;
}

.usecase-emoji {
    font-size: 56px;
    margin-bottom: 16px;
    display: inline-block;
    animation: floatY 3s ease-in-out infinite;
}

.usecase-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.usecase-card > p {
    color: var(--c-text-soft);
    font-size: 14px;
    margin-bottom: 18px;
}

.usecase-list {
    list-style: none;
    padding: 0;
}

.usecase-list li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--c-text-soft);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.usecase-list li::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    background: var(--c-primary);
    border-radius: 50%;
}

/* ============================================
   SECTION 7: CUSTOMIZE
   ============================================ */
.customize-section {
    padding: 100px 0;
    background: linear-gradient(180deg, white 0%, #fef3ff 50%, white 100%);
}

.customize-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.customize-content .section-tag,
.customize-content .section-title,
.customize-content .section-subtitle {
    text-align: left;
}

.customize-content .section-title {
    margin-bottom: 16px;
}

.customize-content .section-subtitle {
    margin-bottom: 32px;
}

.customize-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customize-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    transition: all var(--transition);
}

.customize-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-primary);
}

.customize-bullet {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3ff, #f0f9ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.customize-item h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.customize-item p {
    color: var(--c-text-soft);
    font-size: 14px;
}

.customize-image {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: floatY 6s ease-in-out infinite;
}

.customize-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   SECTION 8: TIPS
   ============================================ */
.tips-section {
    padding: 100px 0;
    background: white;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.tip-card {
    background: linear-gradient(180deg, white, #faf9ff);
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.tip-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-primary);
}

.tip-num {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.tip-card h4 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.tip-card p {
    color: var(--c-text-soft);
    font-size: 14px;
}

kbd {
    display: inline-block;
    padding: 2px 8px;
    background: white;
    border: 1px solid var(--c-border-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* ============================================
   SECTION 9: FAQ
   ============================================ */
.faq-section {
    padding: 100px 0;
    background: linear-gradient(180deg, white 0%, #f0f9ff 100%);
}

.faq-container {
    max-width: 820px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    overflow: hidden;
    transition: all var(--transition);
}

.faq-item:hover {
    border-color: var(--c-primary);
}

.faq-item.active {
    box-shadow: var(--shadow-md);
    border-color: var(--c-primary);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
    color: var(--c-text);
    transition: color var(--transition);
}

.faq-item.active .faq-question {
    color: var(--c-primary);
}

.faq-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3ff, #f0f9ff);
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    transition: all var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.active .faq-icon {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    transform: rotate(45deg);
    animation: gradientShift 6s ease infinite;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--c-text-soft);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   SECTION 10: CTA
   ============================================ */
.cta-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-container {
    position: relative;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #fbbf24 100%);
    background-size: 200% 200%;
    border-radius: var(--radius-xl);
    padding: 80px 40px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: gradientShift 8s ease infinite;
    overflow: hidden;
}

.cta-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.cta-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    animation: floatShape 10s ease-in-out infinite;
}

.cta-shape-1 {
    width: 300px; height: 300px;
    top: -100px; left: -100px;
    animation-delay: 0s;
}

.cta-shape-2 {
    width: 250px; height: 250px;
    bottom: -80px; right: -80px;
    animation-delay: 3s;
}

.cta-shape-3 {
    width: 200px; height: 200px;
    top: 40%; right: 20%;
    animation-delay: 5s;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    line-height: 1.1;
}

.cta-content .gradient-text {
    background: linear-gradient(135deg, #fff7ed, #fef3ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
}

.cta-content p {
    color: rgba(255,255,255,0.95);
    font-size: 1.15rem;
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: white;
    color: var(--c-primary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.cta .btn-primary:hover {
    background: white;
    color: var(--c-primary-dark);
}

.cta .btn-ghost {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.cta .btn-ghost:hover {
    background: rgba(255,255,255,0.25);
    color: white;
    border-color: white;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 20px;
}

.modal[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: white;
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal[aria-hidden="false"] .modal-content {
    transform: scale(1);
    animation: modalPop 0.6s ease;
}

@keyframes modalPop {
    0% { transform: scale(0.5) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(3deg); }
    100% { transform: scale(1) rotate(0); }
}

.modal-emoji {
    font-size: 80px;
    margin-bottom: 16px;
    display: inline-block;
    animation: bounceEmoji 1s ease infinite;
}

@keyframes bounceEmoji {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-15px) rotate(-8deg); }
    75% { transform: translateY(-10px) rotate(8deg); }
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-text);
    margin-bottom: 8px;
}

.modal-winner {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    margin-bottom: 8px;
    word-break: break-word;
}

.modal-subtitle {
    color: var(--c-text-soft);
    margin-bottom: 28px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   CONFETTI
   ============================================ */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 0;
    }
   @media (max-width: 768px) {
    .hero-visual {
        display: none !important;
    }
}

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .floating-card { display: none; }

    .wheel-app {
        grid-template-columns: 1fr;
    }

    .templates-cta {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .customize-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .customize-content .section-tag,
    .customize-content .section-title,
    .customize-content .section-subtitle {
        text-align: center;
    }

    .steps-grid::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .hero { padding: 80px 0 60px; }
    .hero-title { font-size: 2.4rem; }
    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }
    .stat-number { font-size: 1.6rem; }
    section { padding: 60px 0 !important; }
    .section-title { font-size: 2rem; }
    .wheel-app { padding: 16px; }
    .wheel-sidebar { padding: 16px; }
    .wheel-stage { min-height: 460px; padding: 12px; }
    .spin-btn { padding: 16px 44px; font-size: 16px; }
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .steps-grid { grid-template-columns: 1fr; gap: 60px; }
    .features-grid, .usecases-grid, .tips-grid {
        grid-template-columns: 1fr;
    }
    .cta-container { padding: 60px 24px; }
    .modal-content { padding: 36px 24px; }
    .modal-winner { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
    .templates-grid { grid-template-columns: 1fr 1fr; }
    .template-card { padding: 14px; }
    .template-icon { width: 50px; height: 50px; font-size: 24px; }
    .template-name { font-size: 14px; }
    .template-desc { font-size: 11px; }
    .tab-btn { font-size: 10px; padding: 8px 4px; }
    .tab-btn svg { display: none; }
    .theme-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
*:focus-visible {
    outline: 3px solid var(--c-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
