/* ========================================
   BORSA BROKER - Ultra Premium Dark Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #030712;
    --bg-card: #111827;
    --bg-card-hover: #1a2540;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(99, 102, 241, 0.5);
    --text: #f9fafb;
    --text-2: #9ca3af;
    --text-3: #6b7280;
    --indigo: #6366f1;
    --cyan: #06b6d4;
    --emerald: #10b981;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
    --gradient-green: linear-gradient(135deg, #10b981, #06b6d4);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ======= Cosmic Background ======= */
.page-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    overflow: hidden;
}
.page-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: orbFloat 12s ease-in-out infinite alternate;
}
.page-bg .orb-1 { width: 600px; height: 600px; background: #6366f1; top: -10%; left: -5%; }
.page-bg .orb-2 { width: 500px; height: 500px; background: #06b6d4; bottom: -10%; right: -5%; animation-delay: -4s; }
.page-bg .orb-3 { width: 300px; height: 300px; background: #8b5cf6; top: 50%; left: 40%; animation-delay: -8s; }

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
    100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Grid overlay */
.page-bg::after {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

a { color: var(--indigo); text-decoration: none; transition: all 0.3s; }
a:hover { color: var(--cyan); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ======= HEADER ======= */
header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(3, 7, 18, 0.65);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 72px;
}

.logo {
    font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

nav { display: flex; align-items: center; gap: 6px; }
nav a {
    color: var(--text-2); font-weight: 500; font-size: 0.9rem;
    padding: 8px 16px; border-radius: var(--radius-xs);
    transition: all 0.25s;
}
nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ======= HERO ======= */
.hero {
    text-align: center;
    padding: 100px 0 80px;
    position: relative;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 40px;
    animation: heroFadeIn 0.6s ease both;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -2px;
    margin-bottom: 28px;
    animation: heroFadeIn 0.8s ease both 0.1s;
}

.hero h1 .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-2);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.8;
    animation: heroFadeIn 0.8s ease both 0.2s;
}

/* Hero trust strip */
.hero-trust {
    display: flex; justify-content: center; gap: 36px; flex-wrap: wrap;
    animation: heroFadeIn 1s ease both 0.3s;
}
.hero-trust-item {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-3); font-size: 0.85rem; font-weight: 500;
}
.hero-trust-item .icon-circle {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--indigo);
}

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

/* ======= SECTION ======= */
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin: 60px 0 36px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.section-header h2 {
    font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px;
}
.section-header h2 .gradient-text {
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.section-count {
    font-size: 0.8rem; color: var(--text-3);
    padding: 6px 14px; border-radius: 100px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}

/* ======= ARTICLE CARDS ======= */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex; flex-direction: column;
}

/* Hover glow border */
.card::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: var(--radius);
    background: var(--gradient);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}
.card:hover::after { opacity: 1; }
.card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.5), 0 0 32px rgba(99, 102, 241, 0.08);
}

.card-top {
    height: 4px;
    background: var(--gradient);
}

.card-body {
    padding: 28px 24px 20px;
    flex: 1; display: flex; flex-direction: column;
}

.card-badges {
    display: flex; gap: 8px; margin-bottom: 16px;
}

.card h2 {
    font-size: 1.2rem; font-weight: 700; line-height: 1.4;
    margin-bottom: 12px; letter-spacing: -0.3px;
}
.card h2 a { color: var(--text); }
.card h2 a:hover { color: var(--indigo); }

.card-excerpt {
    color: var(--text-2); font-size: 0.92rem; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; flex: 1;
}

.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem; color: var(--text-3);
}
.card-footer-left { display: flex; gap: 16px; align-items: center; }
.card-footer-left span { display: flex; align-items: center; gap: 5px; }

.card-link {
    color: #a5b4fc; font-weight: 600; font-size: 0.85rem;
    display: flex; align-items: center; gap: 6px;
}
.card-link:hover { color: var(--cyan); gap: 10px; }

/* ======= BADGES ======= */
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: 100px;
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
}
.badge-hot { background: rgba(244,63,94,0.1); color: #fb7185; border: 1px solid rgba(244,63,94,0.2); }
.badge-new { background: rgba(16,185,129,0.1); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.badge-view { background: rgba(6,182,212,0.1); color: #22d3ee; border: 1px solid rgba(6,182,212,0.2); }
.badge-keyword { background: rgba(99,102,241,0.1); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.2); }

/* ======= SINGLE ARTICLE ======= */
.article-hero {
    text-align: center; padding: 80px 0 48px; max-width: 800px; margin: 0 auto;
}
.article-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 900;
    line-height: 1.15; letter-spacing: -1px; margin-bottom: 28px;
}
.article-meta {
    display: flex; justify-content: center; align-items: center;
    gap: 20px; flex-wrap: wrap;
    color: var(--text-3); font-size: 0.88rem;
}
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-meta .view-count { color: var(--cyan); font-weight: 700; }

.article-body {
    max-width: 780px; margin: 0 auto 100px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; padding: 48px; position: relative; z-index: 1;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.article-body::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px; background: var(--gradient);
    border-radius: 20px 20px 0 0;
}
.article-body h2 { color: var(--text); font-size: 1.5rem; font-weight: 700; margin: 40px 0 16px; }
.article-body h3 { color: var(--text); font-size: 1.2rem; font-weight: 600; margin: 28px 0 12px; }
.article-body p { color: var(--text-2); font-size: 1.05rem; line-height: 1.9; margin-bottom: 22px; }
.article-body ul, .article-body ol { color: var(--text-2); margin-bottom: 22px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; line-height: 1.7; }
.article-body a { color: #a5b4fc; text-decoration: underline; text-decoration-color: rgba(165,180,252,0.3); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: #a5b4fc; }
.article-body img { max-width: 100%; border-radius: 12px; margin: 24px 0; }
.article-body blockquote {
    border-left: 4px solid var(--indigo); padding: 16px 24px;
    margin: 24px 0; background: rgba(99,102,241,0.04);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    font-style: italic; color: var(--text-2);
}

/* ======= BUTTONS ======= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--gradient); color: #fff;
    padding: 11px 22px; border-radius: var(--radius-xs);
    font-weight: 600; font-size: 0.88rem; border: none; cursor: pointer;
    transition: all 0.3s; box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,0.4); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 4px 16px rgba(244,63,94,0.3); }
.btn-danger:hover { box-shadow: 0 8px 28px rgba(244,63,94,0.4); }
.btn-ghost { background: rgba(255,255,255,0.04); box-shadow: none; border: 1px solid var(--border); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--text); box-shadow: none; }

/* ======= FORMS ======= */
.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text); font-weight: 600; font-size: 0.88rem; }
.form-control {
    width: 100%; background: rgba(17, 24, 39, 0.8); border: 1px solid var(--border);
    color: var(--text); padding: 12px 16px; border-radius: var(--radius-xs);
    font-family: inherit; font-size: 0.95rem; transition: all 0.3s;
}
.form-control:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
textarea.form-control { min-height: 100px; resize: vertical; }

/* ======= STATS ======= */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 24px; border-radius: var(--radius); position: relative; overflow: hidden;
    transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--gradient); }
.stat-card:nth-child(2)::before { background: var(--gradient-green); }
.stat-card:nth-child(3)::before { background: var(--gradient-warm); }
.stat-card h3 { font-size: 0.7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.stat-card .value { font-size: 2.4rem; font-weight: 900; margin-top: 8px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card:nth-child(2) .value { background: var(--gradient-green); -webkit-background-clip: text; }
.stat-card:nth-child(3) .value { background: var(--gradient-warm); -webkit-background-clip: text; }

/* ======= TABLE ======= */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: rgba(255,255,255,0.02); color: var(--text-3); font-weight: 700; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 1px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.015); }
.actions { display: flex; gap: 8px; }

/* ======= FOOTER ======= */
footer {
    border-top: 1px solid var(--border); padding: 48px 0;
    text-align: center; color: var(--text-3); position: relative; z-index: 1;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-brand { font-weight: 900; font-size: 1rem; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
footer p { font-size: 0.82rem; line-height: 1.6; }

/* ======= 404 ======= */
.page-404 { text-align: center; padding: 120px 0; }
.page-404 h1 { font-size: 8rem; font-weight: 900; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.page-404 p { color: var(--text-2); font-size: 1.15rem; margin: 24px 0 40px; }

/* ======= EMPTY ======= */
.empty-state { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--text-3); }
.empty-state p { font-size: 1.05rem; max-width: 400px; margin: 0 auto; }

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
    .hero { padding: 70px 0 60px; }
    .hero h1 { letter-spacing: -1px; }
    .hero-trust { gap: 20px; }
    .article-hero h1 { font-size: 2rem; }
    .article-body { padding: 28px 20px; }
    .article-grid { grid-template-columns: 1fr; gap: 20px; }
    .section-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
    .header-inner { height: 60px; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .stat-grid { grid-template-columns: 1fr; }
    .card-body { padding: 20px 18px 14px; }
    .card-footer { padding: 12px 18px; }
}
