/* ═══════════════════════════════════════════════════════════
   PORTFÓLIO DE PROMPTS IA — Editorial Premium Style
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variáveis (Estilo Minimalista e Luxuoso) ────────────── */
:root {
    --primary:       #111111; /* Carbono Puro */
    --primary-light: #444444; /* Grafite */
    --secondary:     #000000;
    --accent:        #111111;
    --bg-base:       #faf9f6; /* Off-white Quente / Alabastro */
    --bg-card:       #ffffff; /* Branco Puro */
    --border:        #e5e5e0; /* Borda Fina Champagne */
    --border-hover:  #111111;
    --text-primary:  #111111; /* Preto Elegante */
    --text-secondary:#555555; /* Cinza Escuro */
    --text-muted:    #8c8c88; /* Cinza Mudo */
    --success:       #0f9f6e;
    --danger:        #d93838;
    --radius-sm:     4px;
    --radius-md:     8px;
    --radius-lg:     16px;
    --radius-xl:     24px;
    --shadow-card:   0 4px 20px rgba(0, 0, 0, 0.02);
    --shadow-float:  0 16px 40px rgba(17, 17, 17, 0.05);
    --transition:    0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Tipografia Editorial ─────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* ── Botões Elegantes (Retangulares / Minimalistas) ────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm); /* Retangular com cantos suaves */
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}
.btn-primary:hover {
    background: #333333;
    border-color: #333333;
    transform: translateY(-1px);
}
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.btn-danger {
    background: #fff5f5;
    color: var(--danger);
    border: 1px solid #ffd8d8;
}
.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.72rem; }
.btn-lg { padding: 1rem 2.2rem; font-size: 0.85rem; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-primary { background: #f4f3ee; color: #111111; border: 1px solid var(--border); }
.badge-accent  { background: #ffffff; color: #111111; border: 1px solid var(--primary); }
.badge-gray    { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }

/* ── NAVBAR (Estilo Editorial / Luxo) ────────────────────── */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    padding: 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 1.6rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.navbar-nav-center {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.navbar-nav-center a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    transition: color var(--transition);
}
.navbar-nav-center a:hover {
    color: #ffffff;
}
.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.navbar-right a {
    color: #ffffff;
    font-weight: 600;
}

/* ── HERO SECTION (Editorial Cover) ───────────────────────── */
.hero-wrapper {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=1600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding: 8rem 2rem 10rem;
}
.hero-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.55); /* Wash escuro */
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
}
.hero-content h1 {
    font-size: clamp(2.8rem, 6.5vw, 4.8rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}
.hero-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

/* ── PAINEL DE BUSCA RETANGULAR MINIMALISTA ────────────────── */
.search-panel-container {
    max-width: 1000px;
    margin: -60px auto 5rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}
.search-panel {
    background: var(--bg-card);
    border-radius: var(--radius-sm); /* Retangular */
    box-shadow: var(--shadow-float);
    padding: 1.75rem;
    border: 1px solid var(--border);
}
.search-form-row {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.search-form-row input {
    flex: 1;
    border: none;
    background: #ffffff;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    font-family: 'Inter', sans-serif;
}
.search-form-row input::placeholder { color: var(--text-muted); }
.search-form-row button {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background var(--transition);
    font-family: 'Inter', sans-serif;
}
.search-form-row button:hover {
    background: #333333;
}

/* Chips de Filtro Sem Ícones */
.search-chips {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.search-chip-item {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all var(--transition);
}
.search-chip-item:hover,
.search-chip-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* ── GRID DE PROMPTS (Editorial Layout) ──────────────────── */
.section-title-container {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    text-align: center;
}
.section-title-container h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.section-title-container p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
}

.prompt-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.prompt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
}

.card-thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #fcfbf7;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.prompt-card:hover .card-thumb img {
    transform: scale(1.03);
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.card-tool {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    color: var(--text-primary);
    line-height: 1.2;
}
.card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fbfbfa;
}
.card-views {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── SEÇÃO INFERIOR HORIZONTAL (Luxury Banner) ────────────── */
.banner-horizontal {
    max-width: 1200px;
    margin: 0 auto 6rem;
    padding: 0 2rem;
}
.banner-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    overflow: hidden;
    align-items: center;
    border: 1px solid var(--border);
}
.banner-img {
    height: 400px;
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?q=80&w=800&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}
.banner-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.banner-content h2 {
    font-size: 2.6rem;
    color: var(--text-primary);
    line-height: 1.15;
}
.banner-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}
.banner-stats {
    display: flex;
    gap: 3rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-num {
    font-family: 'DM Serif Display', serif;
    font-size: 2.2rem;
    color: var(--primary);
}
.stat-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
}

/* ── HOW-TO STEPS ─────────────────────────────────────────── */
.howto {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4rem;
    margin: 5rem auto;
    max-width: 1200px;
    box-shadow: var(--shadow-card);
}
.howto h2 { font-size: 2rem; margin-bottom: 3rem; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.step {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-sm);
    background: #fbfbfa;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.step:hover { border-color: var(--primary); transform: translateY(-2px); }
.step-num {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
.step h3 { font-family: 'DM Serif Display', serif; font-size: 1.2rem; margin-bottom: 0.5rem; }
.step p  { font-size: 0.85rem; color: var(--text-secondary); }

/* ── MODAL MINIMALISTA ────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-backdrop.active { opacity: 1; pointer-events: all; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    max-width: 720px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    transform: scale(0.97);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 24px 60px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}
.modal-backdrop.active .modal { transform: scale(1); }

.modal-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #fcfbf7;
    border-bottom: 1px solid var(--border);
}
.modal-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.8);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.modal-close:hover { background: var(--danger); }

.modal-content { padding: 2.5rem; }
.modal-meta { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.modal-title { font-size: 1.8rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.modal-desc  { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 2rem; }

.prompt-box {
    background: #fbfbfa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 2rem;
    max-height: 220px;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
}

.copy-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.copy-btn.copied {
    background: var(--success) !important;
    border-color: var(--success) !important;
}

/* ── ADMIN LAYOUT ─────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; background: #faf9f6; }
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    padding: 2rem;
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}
.sidebar-nav { padding: 1.5rem 1rem; flex: 1; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all var(--transition);
    text-decoration: none;
    margin-bottom: 0.35rem;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #f4f3ee;
    color: var(--primary);
}
.sidebar-footer { padding: 2rem 1.5rem; border-top: 1px solid var(--border); }

.admin-main { flex: 1; overflow: hidden; }
.admin-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-topbar h1 { font-size: 1.4rem; }
.admin-content { padding: 2.5rem; overflow-y: auto; height: calc(100vh - 70px); }

/* ── STATS CARDS ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
}
.stat-value { font-family: 'DM Serif Display', serif; font-size: 2.5rem; color: var(--primary); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

/* ── FORM CONTROLS ───────────────────────────────────────── */
.form-group { margin-bottom: 1.75rem; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition);
    outline: none;
    font-family: 'Inter', sans-serif;
}
.form-control:focus {
    border-color: var(--primary);
}

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); background: #fbfbfa; }
thead th { text-align: left; padding: 1.25rem 1rem; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:hover { background: #fbfbfa; }
tbody td { padding: 1.25rem 1rem; color: var(--text-secondary); font-size: 0.9rem; }
.table-thumb { width: 60px; height: 45px; object-fit: cover; border-radius: 4px; }

/* ── UPLOAD AREA ─────────────────────────────────────────── */
.upload-area {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 4rem 1.5rem;
    text-align: center;
    background: #fbfbfa;
}
.upload-area:hover { border-color: var(--primary); background: #f4f3ee; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #faf9f6; }
.login-card { background: #ffffff; border-radius: var(--radius-sm); padding: 3.5rem; width: 100%; max-width: 440px; box-shadow: var(--shadow-float); border: 1px solid var(--border); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .prompts-grid { grid-template-columns: repeat(2, 1fr); }
    .banner-card { grid-template-columns: 1fr; }
    .banner-img { height: 260px; }
}
@media (max-width: 768px) {
    .navbar { padding: 2rem; }
    .navbar-nav-center { display: none; }
    .hero-wrapper { height: 500px; padding-top: 10rem; }
    .search-panel { margin-top: -60px; }
    .prompts-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}
