/* ============================================
   ClipDeck Shared Styles
   Modern, sleek design matching homepage
   ============================================ */

:root {
    --bg-dark: #050505;
    --bg-subtle: #0a0a0a;
    --bg-card: #0f0f0f;
    --bg-card-hover: #141414;
    --accent: #00edfa;
    --accent-dim: rgba(0, 237, 250, 0.08);
    --accent-glow: rgba(0, 237, 250, 0.15);
    --accent-border: rgba(0, 237, 250, 0.25);
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #5a5a5a;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Subtle animated background */
.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 100, 120, 0.08) 0%, transparent 50%),
        var(--bg-dark);
}

/* Grain texture overlay */
.grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   Layout
   ============================================ */

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

.page-container.wide {
    max-width: 900px;
}

.page-container.full {
    max-width: 1200px;
}

/* ============================================
   Header / Navigation
   ============================================ */

.site-header {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.logo-text {
    font-family: var(--sans);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent);
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: var(--border-medium);
}

.card-clickable {
    cursor: pointer;
}

.card-clickable:hover {
    transform: translateY(-2px);
}

/* ============================================
   Clip Card (Modern)
   ============================================ */

.clip-card-modern {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.clip-card-modern:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
}

.clip-cover {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-subtle);
}

.clip-cover-large {
    width: 200px;
    height: 200px;
}

.clip-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clip-title {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
}

.clip-source {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.clip-source a {
    color: var(--accent);
    text-decoration: none;
}

.clip-source a:hover {
    text-decoration: underline;
}

.clip-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.clip-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   Audio Player (Modern)
   ============================================ */

.audio-player-modern {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    margin-top: 12px;
}

audio {
    width: 100%;
    height: 48px;
    border-radius: var(--radius-md);
    accent-color: var(--accent);
    color-scheme: dark;
}

audio::-webkit-media-controls-panel {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-medium);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--accent);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

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

/* ============================================
   Form Elements
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--sans);
    font-size: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 237, 250, 0.03);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   Section Headers
   ============================================ */

.section-header {
    margin-bottom: 32px;
}

.section-title {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-title em {
    font-style: italic;
    color: var(--accent);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    margin-top: auto;
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--accent);
}

/* ============================================
   Breadcrumbs (for wizards)
   ============================================ */

.breadcrumb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
}

.breadcrumb-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.breadcrumb-dot.active {
    background: var(--accent);
    color: #000;
}

.breadcrumb-dot.completed {
    background: var(--accent);
    color: #000;
}

.breadcrumb-label {
    font-size: 12px;
    color: var(--text-muted);
    display: none;
}

.breadcrumb-step.active .breadcrumb-label {
    display: block;
    color: var(--text-primary);
}

.breadcrumb-line {
    width: 32px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.breadcrumb-line.completed {
    background: var(--accent);
}

/* ============================================
   Stats Cards
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-value.accent {
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   Tables
   ============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   Alerts / Messages
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.alert-info {
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ============================================
   File Upload
   ============================================ */

.file-upload {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.file-upload.dragover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.file-upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.file-upload-text {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.file-upload-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   Targeting Pills
   ============================================ */

.target-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.target-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.target-pill:hover {
    border-color: var(--border-medium);
    background: rgba(255, 255, 255, 0.1);
}

.target-pill.selected {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   Pricing Slider
   ============================================ */

.price-slider-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.price-display {
    text-align: center;
    margin-bottom: 24px;
}

.price-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

.price-unit {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 4px;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-up {
    animation: fadeUp 0.5s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Staggered animation delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .page-container {
        padding: 0 16px;
    }

    .clip-card-modern {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .clip-cover {
        width: 100%;
        max-width: 280px;
        height: auto;
        aspect-ratio: 1;
    }

    .site-header {
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .breadcrumb-label {
        display: none !important;
    }
}
