:root {
    --primary: #6750A4; /* MD3 Primary */
    --on-primary: #FFFFFF;
    --primary-container: #EADDFF;
    --on-primary-container: #21005E;
    --secondary: #625B71;
    --on-secondary: #FFFFFF;
    --secondary-container: #E8DEF8;
    --on-secondary-container: #1D192B;
    --tertiary: #FFB900; /* Amber for Accent/Gold */
    --on-tertiary: #1D1B20;
    --surface: #FEF7FF;
    --on-surface: #1D1B20;
    --outline: #79747E;
    --outline-variant: #CAC4D0;
    --bg-dark: #1e1b4b; /* Indigo branding */
    --accent: #B3261E; /* MD3 Error/Red */
}

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

body {
    font-family: "Inter", "system-ui", "-apple-system", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-dark);
    color: var(--on-surface);
    line-height: 1.6;
    letter-spacing: 0.02em; /* Improve font spacing */
    overflow-x: hidden;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--surface);
    min-height: 100vh;
    padding-bottom: 120px; /* Space for FAB */
    position: relative;
}

/* Hero Section - Maintain branding color */
.hero {
    padding: 32px 24px 24px;
    text-align: center;
    color: white;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #312e81 100%);
    position: relative;
    overflow: hidden;
}

.ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    z-index: 2;
}

.ribbon span {
    position: absolute;
    display: block;
    width: 150px;
    padding: 8px 0;
    background-color: var(--accent);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    left: -20px;
    top: 20px;
    transform: rotate(45deg);
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.offer {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.price-line {
    font-size: 1.1rem;
    font-weight: 600;
}

.price {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--tertiary);
    text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-right: 4px;
}

.original-line {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 12px;
}

.original {
    text-decoration: line-through;
}

.buy-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tertiary);
    color: var(--on-tertiary);
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(255, 185, 0, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.buy-button:active {
    transform: scale(0.96);
    box-shadow: 0 2px 4px rgba(255, 185, 0, 0.2);
}

.stats-badge {
    margin-top: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tertiary);
    background: rgba(255, 185, 0, 0.12);
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.countdown {
    margin-top: 16px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

#timer {
    font-weight: 700;
    color: var(--tertiary);
    font-family: "JetBrains Mono", monospace;
    font-size: 1.1rem;
}

/* Section Common */
.section-title {
    color: var(--on-surface);
    margin: 32px 24px 16px;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--primary);
    margin-right: 12px;
    border-radius: 2px;
}

/* Stepper and Cards */
.stepper-container {
    padding: 0 24px;
}

.step-card {
    display: flex;
    gap: 16px;
    margin-bottom: 8px; /* Managed by step-line */
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 2;
}

.step-dot.active {
    background: var(--primary);
    color: var(--on-primary);
}

.step-line {
    width: 2px;
    flex-grow: 1;
    background: var(--outline-variant);
    margin: 4px 0;
}

.step-card:last-child .step-line {
    display: none;
}

.step-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    flex-grow: 1;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--outline-variant);
}

.step-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.step-instruction {
    font-size: 0.9rem;
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    font-weight: 500;
}

.image-placeholder {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f1f3f4;
}

.step-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.step-1-img, .step-2-img {
    height: 240px;
}

.step-3-img {
    height: auto;
}

/* Rules Section */
.rules {
    padding: 0 24px;
    margin-top: 16px;
}

.rule-card {
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: 16px;
    padding: 20px;
    color: var(--secondary);
}

.rule-card h3 {
    color: var(--on-surface);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 16px;
}

.rule-card h3:first-child {
    margin-top: 0;
}

.rule-card ul {
    list-style: none;
}

.rule-card li {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.rule-card li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--primary);
    font-weight: 800;
}

/* Footer */
footer {
    padding: 40px 24px;
    text-align: center;
}

.footer-note {
    font-size: 0.75rem;
    color: var(--outline);
}

/* Floating Action Button (FAB) */
.fab-container {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
    z-index: 100;
    text-decoration: none;
}

.fab-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(103, 80, 164, 0.35);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-button:hover {
    box-shadow: 0 12px 24px rgba(103, 80, 164, 0.45);
    transform: translateY(-2px);
}

.fab-button:active {
    transform: scale(0.96) translateY(0);
}

.fab-button i {
    font-size: 1.25rem;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.price {
    display: inline-block;
    animation: pulse 2.5s infinite ease-in-out;
}

