:root {
    /* Wireframe Palette - Grayscale for Low-Fidelity */
    --wf-bg: #ffffff;
    --wf-bg-alt: #f4f4f4;
    --wf-border: #d1d1d1;
    --wf-text-main: #1a1a1a;
    --wf-text-muted: #666666;
    --wf-accent: #000000;
    --wf-accent-contrast: #ffffff;
    --wf-surface: #ffffff;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadow */
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--wf-bg-alt);
    color: var(--wf-text-main);
    line-height: 1.5;
    display: flex;
    justify-content: center;
}

/* Mobile Container Simulation */
.app-container {
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    background-color: var(--wf-bg);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* Typography */
h1, h2, h3 {
    margin: 0;
    font-weight: 700;
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--wf-text-muted); }
.font-bold { font-weight: 700; }

/* Components */
.header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--wf-border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: sticky;
    top: 0;
    background: var(--wf-bg);
    z-index: 10;
}

.nav-bottom {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--wf-bg);
    border-top: 1px solid var(--wf-border);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: var(--space-sm) 0;
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--wf-text-muted);
    font-size: 10px;
    gap: 4px;
}

.nav-item.active {
    color: var(--wf-accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--wf-accent);
    background: var(--wf-accent);
    color: var(--wf-accent-contrast);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    transition: opacity 0.2s;
}

.btn-outline {
    background: transparent;
    color: var(--wf-accent);
}

.btn-secondary {
    background: var(--wf-bg-alt);
    border-color: var(--wf-border);
    color: var(--wf-text-main);
}

.input-group {
    margin-bottom: var(--space-md);
}

.input-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    font-size: 0.875rem;
}

.input-field {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--wf-border);
    border-radius: var(--radius-md);
    background: var(--wf-bg);
    font-size: 1rem;
}

/* Search Bar */
.search-container {
    padding: var(--space-md);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--wf-bg-alt);
    border-radius: var(--radius-md);
    padding: 0 var(--space-md);
    gap: var(--space-sm);
}

.search-bar input {
    border: none;
    background: transparent;
    padding: var(--space-md) 0;
    flex: 1;
    outline: none;
}

/* Chips */
.chip-scroll {
    display: flex;
    overflow-x: auto;
    gap: var(--space-sm);
    padding: 0 var(--space-md) var(--space-md);
    scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar { display: none; }

.chip {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--wf-border);
    border-radius: var(--radius-full);
    white-space: nowrap;
    font-size: 0.875rem;
    cursor: pointer;
}

.chip.active {
    background: var(--wf-accent);
    color: var(--wf-accent-contrast);
    border-color: var(--wf-accent);
}

/* Cards */
.card {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.book-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
}

.book-card .placeholder-image {
    aspect-ratio: 3/4;
    background: var(--wf-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--wf-border);
}

.book-card-content {
    padding: var(--space-sm);
}

.badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--wf-bg-alt);
    border: 1px solid var(--wf-border);
    border-radius: var(--radius-sm);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--wf-border);
    gap: var(--space-md);
}

.list-item-content {
    flex: 1;
}

/* Placeholder Icons */
.placeholder-icon {
    width: 24px;
    height: 24px;
    border: 2px solid currentColor;
    border-radius: 4px;
    display: inline-block;
}

/* Details Page */
.detail-media {
    width: 100%;
    aspect-ratio: 4/5;
    background: var(--wf-bg-alt);
    position: relative;
}

.video-badge {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 10px;
}

.content-section {
    padding: var(--space-lg) var(--space-md);
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 800;
    margin: var(--space-sm) 0;
}

/* Progress Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
}

.step {
    display: flex;
    gap: var(--space-md);
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: -24px;
    width: 2px;
    background: var(--wf-border);
}

.step:last-child::before { display: none; }

.step-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--wf-border);
    background: var(--wf-bg);
    z-index: 1;
}

.step.active .step-indicator {
    background: var(--wf-accent);
    border-color: var(--wf-accent);
}

.step.completed .step-indicator {
    background: var(--wf-border);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 140px;
    height: 48px;
    background: var(--wf-accent);
    color: var(--wf-accent-contrast);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
    font-weight: 600;
    z-index: 9;
}

/* Utils */
.mt-auto { margin-top: auto; }
.mb-lg { margin-bottom: var(--space-lg); }
.p-md { padding: var(--space-md); }
