/* ========================================
   ClipperAI — Brutalist Pop Components
   ======================================== */

/* --- User Avatar --- */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 0;
    border: 3px solid var(--ink);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Credit Display --- */
.credit-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 700;
}

.credit-icon {
    color: var(--pop);
    font-size: 14px;
}

.credit-count {
    color: var(--paper);
    font-size: 13px;
    font-weight: 700;
}

/* --- Dashboard Stats --- */
.stats-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    width: 100%;
}

.stat-box {
    flex: 1;
    min-width: 140px;
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 0;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-box:nth-child(2) { background: var(--lime); }
.stat-box:nth-child(3) { background: var(--pop); color: var(--paper); }
.stat-box:nth-child(3) .stat-label { color: var(--paper); }
.stat-box:nth-child(4) { background: var(--blue); color: var(--paper); }
.stat-box:nth-child(4) .stat-label { color: var(--paper); }

.stat-value {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--ink);
    text-shadow: none;
    line-height: 1;
}

.stat-box:nth-child(3) .stat-value,
.stat-box:nth-child(4) .stat-value { color: var(--paper); }

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- Checkout Flow --- */
.checkout-step {
    padding: 20px;
    margin-bottom: 16px;
    border: 3px solid var(--ink);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.checkout-step-number {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--pop);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.payment-waiting {
    text-align: center;
    padding: 32px;
}

.payment-waiting .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--ink);
    border-top-color: var(--pop);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 16px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.payment-success {
    text-align: center;
    padding: 32px;
    color: var(--ink);
}

.payment-success h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

/* --- Faucet Link --- */
.faucet-notice {
    background: var(--amber);
    border: 3px solid var(--ink);
    padding: 14px 16px;
    font-size: 14px;
    margin-top: 16px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.faucet-notice a {
    color: var(--ink);
    text-decoration: underline;
    font-weight: 700;
}

/* --- Settings Page --- */
.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--ink);
}

/* --- Account Info --- */
.account-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 2px dashed rgba(0,0,0,0.2);
}

.account-info-label {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.account-info-value {
    color: var(--ink);
    font-weight: 600;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
    border: 3px dashed var(--ink);
    background: var(--paper);
    font-weight: 600;
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

/* --- Pagination / Load More --- */
.load-more {
    text-align: center;
    padding: 16px;
}

/* --- Chunked Progress Bar --- */
.chunked-progress-bar {
    width: 100%;
    height: 24px;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.chunked-progress-fill {
    height: 100%;
    background: var(--pop);
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(0,0,0,0.15) 8px,
        rgba(0,0,0,0.15) 16px
    );
    transition: width 1s ease;
    border-radius: 0;
    border-right: 3px solid var(--ink);
}

/* --- Upload Drop Zone --- */
.upload-zone {
    border: 4px dashed var(--ink);
    border-radius: 0;
    background: var(--amber);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: var(--shadow-md);
}

.upload-zone:hover,
.upload-zone.drag-over {
    background: var(--lime);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--ink);
}

.upload-zone-content {
    pointer-events: none;
    font-weight: 600;
}

.upload-zone label {
    pointer-events: all;
}

/* --- Style Picker (Generate Page) --- */
.style-pick.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.style-pick.locked:hover {
    transform: none;
    box-shadow: 3px 3px 0 var(--ink);
}

/* --- Time Input Group (H:M:S) --- */
.time-input-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.time-input-group .time-segment {
    width: 60px;
    text-align: center;
    padding: 12px 4px;
    font-size: 18px;
    font-weight: 700;
    -moz-appearance: textfield;
    border-radius: 0;
}

.time-input-group .time-segment::-webkit-inner-spin-button,
.time-input-group .time-segment::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-sep {
    color: var(--ink);
    font-size: 22px;
    padding: 0 6px;
    font-weight: 900;
    font-family: var(--font-heading);
}

/* --- Tab Buttons --- */
.tab-btn {
    flex: 1;
    border-radius: 0;
}

/* --- Toggle Switch (Generate Page) --- */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 0;
    user-select: none;
    font-weight: 600;
}

.toggle-switch .toggle-track {
    width: 48px;
    height: 26px;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 0;
    position: relative;
    transition: all 0.15s;
    flex-shrink: 0;
}

.toggle-switch .toggle-track::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 18px;
    height: 18px;
    background: var(--ink);
    border-radius: 0;
    transition: all 0.15s;
}

.toggle-switch.active .toggle-track {
    background: var(--lime);
    border-color: var(--ink);
}

.toggle-switch.active .toggle-track::after {
    left: 25px;
    background: var(--ink);
    box-shadow: none;
}

/* --- Live Preview Panel (Generate Page) --- */
.preview-phone {
    background: var(--ink);
    border: 4px solid var(--ink);
    border-radius: 0;
    padding: 0;
    aspect-ratio: 9 / 16;
    max-height: 480px;
    width: auto;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

.preview-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 12px;
    background: linear-gradient(180deg, #2a2a2a, #0a0a0a);
    border: none;
    overflow: hidden;
    position: relative;
}

.preview-video-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255,255,255,0.15);
    margin: 12px 0;
    position: relative;
}

/* Video mockup placeholder */
.preview-placeholder {
    text-align: center;
    color: rgba(255,255,255,0.3);
    animation: pulse 2s infinite;
}

.preview-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.preview-placeholder-text {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Video overlay (captions and subtitles) */
.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.preview-caption {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--amber);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
    text-align: center;
    padding: 12px 8px;
    word-wrap: break-word;
    transition: color 0.3s, opacity 0.3s;
    text-transform: uppercase;
    line-height: 1.05;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.preview-subtitle {
    font-family: var(--font-heading);
    font-size: 28px;
    color: #fff;
    text-align: center;
    padding: 12px 8px;
    word-wrap: break-word;
    transition: opacity 0.3s;
    text-transform: uppercase;
    line-height: 1.05;
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    margin: 0 12px;
}

/* Video overlay text styles */
.preview-overlay .preview-subtitle {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    margin: 0 12px;
    text-align: center;
}

.preview-hl {
    font-weight: bold;
    color: #fff;
    background: var(--pop);
    padding: 2px 8px;
    border-radius: 0;
    transition: color 0.3s, background-color 0.3s;
    display: inline-block;
}

/* --- Style Preview Images --- */
.style-preview-img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border: 2px solid var(--ink);
    margin-bottom: 6px;
    transition: all 0.15s;
    border-radius: 0;
}

.style-option.active .style-preview-img {
    border-color: var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
}

.style-option.locked .style-preview-img {
    opacity: 0.4;
    filter: grayscale(0.6);
}

/* --- Style Chip Grid (compact, label-only) --- */
.style-chip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}
.style-chip {
    padding: 10px 8px;
    text-align: center;
    background: var(--paper);
    border: 2px solid var(--ink);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
    line-height: 1.1;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.style-chip:hover {
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--ink);
}
.style-chip.active {
    background: var(--blue);
    color: var(--paper);
    box-shadow: 2px 2px 0 var(--ink);
    transform: translate(-1px, -1px);
}
.style-chip.locked {
    opacity: 0.55;
    cursor: not-allowed;
}
.style-chip.locked:hover {
    transform: none;
    box-shadow: none;
}
.chip-pro {
    background: var(--pop);
    color: var(--paper);
    font-size: 9px;
    padding: 1px 4px;
    margin-left: 4px;
    font-weight: 800;
}

/* Legacy preview-img style grid (kept for other pages if any) */
.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.style-option {
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 0;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.1s;
    user-select: none;
    box-shadow: 3px 3px 0 var(--ink);
    font-weight: 600;
}

.style-option:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
}

.style-option.active {
    background: var(--blue);
    color: var(--paper);
}

.style-option.active .style-label,
.style-option.active .style-desc { color: var(--paper); }

.style-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--ink);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.style-desc {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* --- Color Palette (Generate Page) --- */
.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    box-shadow: 2px 2px 0 var(--ink);
}

.color-swatch:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}

.color-swatch.active {
    transform: scale(1.1) translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
}

.color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--paper);
    font-weight: 900;
    font-size: 18px;
    text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);
}

/* --- Score Pills --- */
.score-pill {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-heading);
    font-size: 11px;
    border: 2px solid var(--ink);
    border-radius: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.score-green { background: var(--lime); color: var(--ink); }
.score-yellow { background: var(--amber); color: var(--ink); }
.score-red { background: var(--pop); color: var(--paper); }

/* --- Highlight Detection Cards --- */
.highlight-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.highlight-card {
    display: flex;
    align-items: stretch;
    gap: 14px;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 0;
    padding: 12px;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    user-select: none;
    box-shadow: 4px 4px 0 var(--ink);
}

.highlight-card:hover {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--ink);
}

.highlight-card:has(input:checked) {
    background: var(--lime);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
}

.highlight-rank {
    position: absolute;
    top: -10px;
    left: -10px;
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--paper);
    background: var(--pop);
    border: 3px solid var(--ink);
    padding: 4px 10px;
    text-shadow: none;
    z-index: 1;
}

.highlight-thumb {
    width: 110px;
    height: 70px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--ink);
    border: 3px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlight-thumb-placeholder {
    font-size: 11px;
    color: var(--paper);
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.highlight-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.highlight-time {
    font-size: 14px;
    color: var(--ink);
    font-family: var(--font-mono);
    font-weight: 700;
}

.highlight-duration {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 6px;
    font-weight: 500;
}

.highlight-scores {
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-score {
    font-family: var(--font-heading);
    font-size: 11px;
    color: var(--ink);
    background: var(--lime);
    border: 2px solid var(--ink);
    padding: 2px 8px;
    text-shadow: none;
    text-transform: uppercase;
}

.highlight-tag {
    font-family: var(--font-heading);
    font-size: 10px;
    padding: 3px 8px;
    background: var(--blue);
    border: 2px solid var(--ink);
    color: var(--paper);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-summary {
    font-size: 13px;
    color: var(--ink);
    line-height: 1.4;
    font-weight: 500;
}

.highlight-transcript {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.highlight-check {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 3px solid var(--ink);
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    transition: all 0.1s;
}

.highlight-card:has(input:checked) .highlight-check {
    background: var(--ink);
}

.highlight-card:has(input:checked) .highlight-check::after {
    content: '✓';
    color: var(--lime);
    font-weight: 900;
    font-size: 18px;
}

/* ========================================
   Brutalist Pop — Page Shell (hero, layout)
   ======================================== */
.brutal-hero {
    margin-bottom: 32px;
    position: relative;
}
.brutal-hero h1 {
    font-family: var(--font-heading);
    font-size: 88px;
    line-height: 0.9;
    letter-spacing: -3px;
    text-transform: uppercase;
    margin: 0 0 16px;
    color: var(--ink);
}
.brutal-hero .star {
    display: inline-block;
    background: var(--pop);
    color: var(--paper);
    padding: 0 14px;
    transform: rotate(-3deg);
}
.brutal-hero .underline {
    display: inline-block;
    border-bottom: 8px solid var(--blue);
}
.brutal-hero .subtitle {
    font-size: 17px;
    font-weight: 500;
    max-width: 560px;
    background: var(--paper);
    padding: 12px 18px;
    border: 3px solid var(--ink);
    display: inline-block;
    box-shadow: 6px 6px 0 var(--ink);
    color: var(--ink);
    margin: 0;
}
.brutal-hero .sticker {
    position: absolute;
    top: 0;
    right: 16px;
    background: var(--lime);
    color: var(--ink);
    padding: 18px 24px;
    font-family: var(--font-heading);
    font-size: 18px;
    text-align: center;
    border: 3px solid var(--ink);
    transform: rotate(8deg);
    box-shadow: 6px 6px 0 var(--ink);
    text-transform: uppercase;
}
.brutal-hero .sticker small {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
}
@media (max-width: 720px) {
    .brutal-hero h1 { font-size: 56px; letter-spacing: -2px; }
    .brutal-hero .sticker { display: none; }
}

/* Two-column generate layout */
.brutal-layout {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 32px;
    align-items: start;
    width: 100%;
}
@media (max-width: 960px) {
    .brutal-layout { grid-template-columns: 1fr; }
}

/* Bare card variants (no titlebar) */
.card.brutal {
    background: var(--paper);
    border: 4px solid var(--ink);
    padding: 32px;
    box-shadow: 10px 10px 0 var(--ink);
}
.card.brutal:hover {
    transform: none;
    box-shadow: 10px 10px 0 var(--ink);
}
.card.brutal.pop {
    background: var(--lime);
    transform: rotate(-1deg);
    position: sticky;
    top: 96px;
}
.card.brutal.pop:hover { transform: rotate(-1deg); }

/* Brutalist tabs */
.brutal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}
.brutal-tab {
    padding: 12px 24px;
    border: 3px solid var(--ink);
    background: var(--paper);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    color: var(--ink);
    letter-spacing: 0.5px;
}
.brutal-tab:not(:first-child) { border-left: none; }
.brutal-tab.active {
    background: var(--ink);
    color: var(--paper);
}

/* Bigger preview card meta row */
.preview-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-top: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink);
}
.preview-meta span:last-child { color: var(--ink); opacity: 0.7; }

/* --- Preset Grid (Generate Page Content Type Selection) --- */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.preset-card {
    padding: 0.75rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 11px;
    font-weight: 700;
}

.preset-card:hover {
    border-color: var(--blue);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}

.preset-card.active {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}

.preset-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.25rem;
}

.preset-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
}

