/* =============================================
   AI Chat Studio - Base Styles
   ============================================= */

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

:root {
    --bg: #050505;
    --surface: #0e0e0e;
    --surface2: #161616;
    --border: #222222;
    --border-light: #1a1a1a;
    --text: #ffffff;
    --text-muted: #888888;
    --text-dim: #555555;
    --accent: #c8ff00;
    --accent-dark: #a8d900;
    --card-bg: #0c0c0c;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #1e1e1e;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a2a2a;
}

/* =============================================
   NAV (for public pages)
   ============================================= */
.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid transparent;
}

.public-nav .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--text);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    text-align: center;
    padding: 80px 24px 60px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto 36px;
}

/* =============================================
   SEARCH BAR
   ============================================= */
.search-wrapper {
    max-width: 520px;
    margin: 0 auto 24px;
}

.search-bar {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 12px 16px;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 14px;
}

.search-bar input::placeholder {
    color: var(--text-dim);
}

.search-submit {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 9px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
.search-submit:hover {
    background: var(--accent-dark);
    transform: scale(1.04);
}

/* =============================================
   CHIPS
   ============================================= */
.chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #181818;
    border: 1px solid #2c2c2c;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12.5px;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.chip:hover {
    border-color: #444;
    color: var(--text);
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.view-all {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.view-all:hover {
    color: var(--text);
}

/* =============================================
   GRID
   ============================================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* =============================================
   CARD (Base)
   ============================================= */
.card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid #1a1a1a;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s;
}
.card:hover {
    border-color: #333;
}

.card-visual {
    width: 100%;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}

.card-visual-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.card-visual-label h3 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.card-tag {
    display: inline-block;
    margin-top: 5px;
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.06);
    padding: 2px 7px;
    border-radius: 4px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--card-bg);
}

.card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-dim);
    transition: color 0.15s;
}
.card:hover .stat {
    color: var(--text-muted);
}

/* =============================================
   AVATAR
   ============================================= */
.avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 10px;
}

.avatar-md {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 22px;
}

.avatar-xl {
    width: 260px;
    height: 260px;
    font-size: 80px;
}

/* =============================================
   BOTTOM BAR
   ============================================= */
.bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    border-top: 1px solid #1a1a1a;
}

.bottom-bar .copy {
    font-size: 12px;
    color: var(--text-dim);
}

.bottom-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-dim);
}
.bottom-socials a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 18px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.bottom-socials a:hover {
    color: var(--text);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    border: none;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: #444;
    color: var(--text);
}

.btn-danger {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
}
.btn-danger:hover {
    background: rgba(239,68,68,0.18);
}

/* =============================================
   STATUS DOTS
   ============================================= */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.status-published { background: #22c55e; }
.status-draft { background: #f59e0b; }
.status-archived { background: #6b7280; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .public-nav {
        padding: 16px 24px;
    }
    .bottom-bar {
        padding: 16px 24px;
    }
}
