@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

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

:root {
    --orange: #ff5e00;
    --orange-glow: #ff7a2a;
    --orange-dim: rgba(255, 94, 0, 0.15);
    --orange-dim2: rgba(255, 94, 0, 0.08);
    --bg: #0d0d0f;
    --bg2: #13131a;
    --bg3: #1a1a24;
    --bg4: #20202e;
    --surface: rgba(255,255,255,0.04);
    --surface2: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.08);
    --border-bright: rgba(255, 94, 0, 0.35);
    --text: #e8e8f0;
    --text-muted: #6b6b80;
    --text-dim: #9090a8;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 12px;
    --radius-lg: 18px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-weight: 400;
    /* subtle noise texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

/* ─── Navbar ─── */
.navbar {
    background: rgba(13, 13, 15, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
    opacity: 0.4;
}

.navbar .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .logo span {
    color: var(--orange);
}

.navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

.navbar .nav-right a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}

.navbar .nav-right a:hover { color: var(--text); }

.navbar .points-badge {
    background: var(--orange-dim);
    border: 1px solid var(--border-bright);
    color: var(--orange-glow);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ─── Container ─── */
.container { max-width: 980px; margin: 0 auto; padding: 20px 16px; }

/* ─── Cards ─── */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.card:hover { border-color: rgba(255,255,255,0.12); }
.card-body { padding: 18px; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.15s;
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--orange);
    color: white;
    box-shadow: 0 0 20px rgba(255, 94, 0, 0.3);
}
.btn-primary:hover {
    background: var(--orange-glow);
    box-shadow: 0 0 28px rgba(255, 94, 0, 0.45);
}
.btn-primary:disabled {
    background: var(--bg4);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--orange-glow);
}
.btn-outline:hover {
    background: var(--orange-dim);
    border-color: var(--orange);
}

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
}
.btn-ghost:hover {
    background: var(--surface2);
    color: var(--text);
}

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.35); color: var(--success); }
.btn-danger  { background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.35);  color: var(--danger); }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 94, 0, 0.12);
}

.input-row { display: flex; gap: 8px; }
.input-row .form-input { flex: 1; }

/* ─── Video / Clip Grid ─── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.clip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.video-card, .clip-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), border-color 0.2s, box-shadow 0.22s;
    animation: fadeUp 0.4s ease both;
}

.video-card:hover, .clip-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 94, 0, 0.25);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,94,0,0.1);
}

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

.video-card .thumb,
.clip-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-card .thumb img,
.clip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.video-card:hover .thumb img,
.clip-card:hover .clip-thumb img {
    transform: scale(1.04);
}

.clip-thumb video {
    width: 100%; height: 100%; object-fit: cover; display: none;
}
.clip-thumb.playing img,
.clip-thumb.playing .play-overlay { display: none; }
.clip-thumb.playing video { display: block; }

/* Play overlay */
.play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.2s;
}
.clip-thumb:hover .play-overlay { background: rgba(0,0,0,0.5); }

.play-overlay::before {
    content: '';
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255, 94, 0, 0.85);
    position: absolute;
    box-shadow: 0 0 30px rgba(255,94,0,0.5);
    transition: transform 0.2s;
}
.clip-thumb:hover .play-overlay::before {
    transform: scale(1.1);
}
.play-overlay::after {
    content: '';
    position: absolute; z-index: 1;
    border-style: solid;
    border-width: 9px 0 9px 16px;
    border-color: transparent transparent transparent white;
    margin-left: 3px;
}

.video-card .play-icon {
    position: absolute;
    font-size: 48px;
    color: rgba(255,255,255,0.8);
}

.video-card .goal-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--orange);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(255,94,0,0.4);
}

.video-card .info {
    padding: 12px 14px;
}
.video-card .info .title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.video-card .info .meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Clip card bottom */
.clip-bottom {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}
.clip-bottom .clip-info { flex: 1; min-width: 0; }
.clip-bottom .clip-label { font-size: 14px; font-weight: 500; color: var(--text); }
.clip-bottom .clip-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.clip-bottom .clip-meta a { color: var(--orange-glow); text-decoration: none; }
.clip-bottom .clip-btns { display: flex; gap: 6px; flex-shrink: 0; }
.clip-bottom .clip-time { font-size: 12px; color: var(--text-muted); }

/* ─── Status badges ─── */
.status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4px;
}
.status-processing {
    background: rgba(255, 94, 0, 0.12);
    color: var(--orange-glow);
    border: 1px solid rgba(255,94,0,0.25);
}
.status-ready {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.25);
}
.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

/* ─── Profile stats ─── */
.stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.stat-box {
    flex: 1;
    text-align: center;
    padding: 18px 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.stat-box:hover { border-color: var(--border-bright); }
.stat-box .num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 1px;
    color: var(--orange);
    line-height: 1;
}
.stat-box .label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* ─── Recharge plans ─── */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.plan-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
    overflow: hidden;
}
.plan-card:hover {
    border-color: rgba(255,94,0,0.3);
    background: var(--bg4);
}
.plan-card.selected {
    border-color: var(--orange);
    background: var(--orange-dim);
    box-shadow: 0 0 0 1px var(--orange) inset, 0 0 20px rgba(255,94,0,0.1);
}
.plan-card .price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 1px;
    color: var(--orange);
    line-height: 1;
}
.plan-card .points {
    font-size: 14px;
    color: var(--text);
    margin-top: 6px;
    font-weight: 500;
}
.plan-card .bonus {
    font-size: 12px;
    color: var(--orange-glow);
    margin-top: 3px;
}
.plan-card .unit-price {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}
.plan-card .tag {
    position: absolute;
    top: 0; right: 0;
    background: var(--orange);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 0 var(--radius) 0 10px;
    letter-spacing: 0.5px;
}

/* ─── Tabs ─── */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    gap: 4px;
}
.tab {
    padding: 10px 18px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-muted);
    transition: color 0.2s;
    letter-spacing: 0.3px;
}
.tab:hover { color: var(--text-dim); }
.tab.active {
    color: var(--orange-glow);
    border-bottom-color: var(--orange);
    font-weight: 500;
}

/* ─── Toast ─── */
.toast {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--bg4);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 13px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── Loading / Spinner ─── */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.spinner {
    display: inline-block;
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty state ─── */
.empty {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
}
.empty .icon { font-size: 52px; margin-bottom: 14px; opacity: 0.5; }
.empty p { font-size: 14px; line-height: 1.7; }

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}
.modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 92%;
    max-width: 420px;
    padding: 28px 24px;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.modal h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    color: var(--text);
}

/* ─── Comments ─── */
.comment-section .comment-input {
    resize: vertical;
    min-height: 72px;
    background: var(--bg3);
}
.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.comment-email {
    font-size: 13px;
    font-weight: 500;
    color: var(--orange-glow);
}
.comment-time {
    font-size: 11px;
    color: var(--text-muted);
}
.comment-content {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}
.comment-footer { margin-top: 8px; }
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: 'Noto Sans SC', sans-serif;
}
.like-btn:hover { background: var(--surface); color: var(--text-dim); }
.like-btn .like-icon { font-size: 15px; }
.like-btn.liked { color: #f87171; }

/* ─── Progress bar ─── */
.progress-track {
    background: var(--bg4);
    border-radius: 4px;
    overflow: hidden;
    height: 6px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--orange-glow));
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(255, 94, 0, 0.5);
}

/* ─── Processing panel ─── */
.proc-panel {
    background: var(--bg2);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
    animation: fadeUp 0.3s ease;
}
.proc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.proc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.proc-msg {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

/* ─── Drop zone ─── */
.drop-zone {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg3);
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--orange);
    background: var(--orange-dim2);
}
.drop-zone .dz-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.6; }
.drop-zone .dz-text { font-size: 14px; color: var(--text-muted); }
.drop-zone .dz-file { font-size: 14px; color: var(--text); font-weight: 500; }
.drop-zone .dz-size { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ─── Section headings ─── */
.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: 2px;
    color: var(--text);
    margin-bottom: 16px;
}
.section-title span { color: var(--orange); }

/* ─── Divider ─── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .video-grid, .clip-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .plan-grid { grid-template-columns: 1fr 1fr; }
    .stats-row { gap: 8px; }
    .container { padding: 14px 12px; }
    .stat-box .num { font-size: 28px; }
    .clip-bottom .clip-btns { flex-direction: column; }
}

@media (max-width: 420px) {
    .video-grid, .clip-grid { grid-template-columns: 1fr; }
}
