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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #09090b;
    color: #e4e4e7;
    min-height: 100vh;
}

/* Login */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-box h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f43f5e, #e879a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-box p {
    font-size: 14px;
    color: #71717a;
    margin-bottom: 24px;
}

.login-box input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 15px;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.login-box input:focus {
    border-color: #f43f5e;
}

.login-box button {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-box button:hover { opacity: 0.9; }

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.topbar h1 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #f43f5e, #e879a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topbar button {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #a1a1aa;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.topbar button:hover { border-color: #f43f5e; color: #fff; }

/* Search */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus { border-color: #f43f5e; }

.search-bar button {
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.search-bar button:hover { opacity: 0.9; }
.search-bar button:disabled { opacity: 0.5; cursor: wait; }

/* Profile header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}

.profile-header img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-header .info h2 {
    font-size: 18px;
    font-weight: 600;
}

.profile-header .info span {
    font-size: 13px;
    color: #71717a;
}

.profile-stats {
    margin-left: auto;
    display: flex;
    gap: 24px;
    text-align: center;
}

.profile-stats .stat-val {
    font-size: 20px;
    font-weight: 700;
    color: #f43f5e;
}

.profile-stats .stat-label {
    font-size: 11px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-tabs button {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: #a1a1aa;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tabs button.active {
    background: rgba(244,63,94,0.15);
    border-color: #f43f5e;
    color: #f43f5e;
}

.filter-tabs button:hover:not(.active) { border-color: rgba(255,255,255,0.2); color: #fff; }

/* Reels grid */
.reels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.reel-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.reel-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.reel-card.trial { border-color: rgba(244,63,94,0.4); }
.reel-card.maybe { border-color: rgba(251,191,36,0.3); }

.reel-thumb {
    position: relative;
    aspect-ratio: 9/16;
    background: #18181b;
    overflow: hidden;
}

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

.reel-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reel-badge.trial { background: rgba(244,63,94,0.9); color: #fff; }
.reel-badge.maybe { background: rgba(251,191,36,0.9); color: #000; }
.reel-badge.organic { background: rgba(255,255,255,0.15); color: #a1a1aa; }

.reel-views {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.reel-meta {
    padding: 12px;
}

.reel-meta .reel-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #71717a;
    margin-bottom: 6px;
}

.reel-meta .reel-score {
    font-size: 13px;
    font-weight: 600;
}

.reel-meta .reel-score.high { color: #f43f5e; }
.reel-meta .reel-score.medium { color: #fbbf24; }
.reel-meta .reel-score.low { color: #71717a; }

.reel-meta .reel-caption {
    font-size: 12px;
    color: #52525b;
    margin-top: 6px;
    line-height: 1.4;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 0;
    color: #71717a;
    font-size: 15px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(244,63,94,0.2);
    border-top-color: #f43f5e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

/* Error */
.error-msg {
    text-align: center;
    padding: 24px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    color: #fca5a5;
    font-size: 14px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: #52525b;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p { font-size: 15px; }

/* Creator Grid */
.creator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.creator-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.creator-card:hover {
    border-color: rgba(244,63,94,0.4);
    transform: translateY(-2px);
}

.creator-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.creator-card-top img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.creator-info h3 {
    font-size: 15px;
    font-weight: 600;
}

.creator-info span {
    font-size: 12px;
    color: #71717a;
}

.remove-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: #71717a;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239,68,68,0.1);
}

.creator-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.cs { flex: 1; text-align: center; }

.cs-val {
    font-size: 18px;
    font-weight: 700;
    color: #e4e4e7;
}

.cs-val.trial-num { color: #f43f5e; }

.cs-label {
    font-size: 11px;
    color: #52525b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.creator-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.creator-card-footer span {
    font-size: 12px;
    color: #52525b;
}

.refresh-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #a1a1aa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover { border-color: #f43f5e; color: #fff; }
.refresh-btn:disabled { opacity: 0.5; cursor: wait; }

/* Back button */
.back-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #a1a1aa;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.back-btn:hover { border-color: #f43f5e; color: #fff; }

/* Responsive */
@media (max-width: 640px) {
    .search-bar { flex-direction: column; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-stats { margin-left: 0; }
    .reels-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .creator-grid { grid-template-columns: 1fr; }
}
