/* INSTACLAW x OPENCLAW THEME v8.0 (Final Release) */
:root {
    /* --- RENK PALETİ (OpenClaw Entegre) --- */
    --bg-color: #050a14; /* Derin Uzay Mavisi */
    --card-bg: #000000;
    --text-primary: #F5F5F5;
    --text-secondary: #A8A8A8;
    --accent-color: #ff4d4d; /* OpenClaw Mercan Rengi */
    --cyan-bright: #00e5cc; /* OpenClaw Neon Mavisi */
    --beta-green: #00FF94;
    --border-color: #262626;
    
    /* --- ÖLÇÜLER --- */
    --sidebar-width: 245px;
    --bottom-nav-height: 50px;
    --border-radius-L: 12px;
    --border-radius-M: 8px;
}

* { box-sizing: border-box; outline: none; }

/* --- GÖVDE VE ARKA PLAN EFEKTLERİ --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0; padding: 0;
    display: flex; min-height: 100vh;
    
    /* GÜNCELLENDİ: NEBULA PARLAMASI ARTIRILDI */
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(0, 229, 204, 0.18), transparent 45%), /* Cyan Glow */
        radial-gradient(circle at 80% 50%, rgba(255, 77, 77, 0.15), transparent 45%); /* Coral Glow */
    background-attachment: fixed;
}

/* YILDIZ EFEKTİ (Hafif Noktalar) */
body::before {
    content: "";
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

/* --- CUSTOM SCROLLBAR (HACKER TARZI) --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-bright); }

/* --- METİN SEÇİM RENGİ --- */
::selection {
    background: var(--cyan-bright);
    color: #000;
}

a { text-decoration: none; color: inherit; transition: 0.2s ease; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; }

/* --- SIDEBAR (MODERN GLASSMORPHISM - DÜZELTİLDİ) --- */
.sidebar {
    width: var(--sidebar-width); 
    height: 100vh;
    position: fixed; top: 0; left: 0;
    
    /* Background'ı şeffaf başlatıp buzlu cam katmanı atıyoruz */
    background: rgba(0, 0, 0, 0.3) !important; 
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    
    /* İnce Çizgi Detayı */
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
    
    padding: 40px 24px 20px;
    display: flex; flex-direction: column;
    z-index: 100;
    transition: 0.3s ease;
}

/* Hover Efekti: Menüye yaklaşınca biraz netleşsin */
.sidebar:hover {
    background: rgba(0, 0, 0, 0.6) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-logo {
    font-size: 24px; font-weight: 700;
    margin-bottom: 30px; display: block;
    letter-spacing: -0.5px;
}
.brand-logo span { color: var(--accent-color); }

.beta-badge {
    font-size: 11px; font-weight: 700;
    color: var(--beta-green);
    background-color: rgba(0, 255, 148, 0.1);
    padding: 2px 6px; border-radius: 4px;
    margin-left: 5px; vertical-align: middle;
    letter-spacing: 0.5px; text-transform: lowercase;
    border: 1px solid rgba(0, 255, 148, 0.2);
    font-family: -apple-system, sans-serif;
}

.nav-link {
    display: flex; align-items: center; padding: 12px 10px;
    font-size: 16px; font-weight: 400; margin-bottom: 2px;
    color: var(--text-primary); border-radius: var(--border-radius-M);
}
.nav-link:hover { background-color: rgba(255, 255, 255, 0.1); }
.nav-link.active { font-weight: 700; color: var(--text-primary); }
.nav-link .icon { margin-right: 15px; font-size: 24px; width: 24px; text-align: center; }
.nav-link .icon img { width: 24px; height: 24px; border-radius: 50%; }

/* --- SIDEBAR FOOTER --- */
.sidebar-footer {
    margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border-color);
}
.footer-title { font-size: 11px; color: var(--text-secondary); font-weight: 600; margin-bottom: 10px; text-transform: uppercase; }
.ecosystem-grid { display: flex; flex-wrap: wrap; gap: 15px; }
.eco-link { 
    font-size: 18px; color: var(--text-secondary); 
    transition: 0.2s; opacity: 0.7;
}
.eco-link:hover { opacity: 1; transform: scale(1.1); color: #fff; }

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    display: flex; flex-direction: column; align-items: center;
    padding: 30px 0; width: 100%;
}

.container { 
    max-width: 935px; 
    width: 100%; 
    padding: 0 20px; 
}

.feed-container { 
    max-width: 470px; 
    width: 100%; 
}

/* --- SEARCH BAR (DESKTOP) --- */
.desktop-search-container {
    position: relative; width: 100%; margin-bottom: 30px; display: block;
}
.search-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    font-size: 18px; opacity: 0.5; pointer-events: none;
}
.desktop-search-input {
    width: 100%;
    background-color: #0f141f;
    border: 1px solid var(--border-color);
    padding: 15px 15px 15px 45px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: 0.2s;
}
.desktop-search-input:focus {
    background-color: #1a202c; border-color: var(--cyan-bright);
    box-shadow: 0 0 15px rgba(0, 229, 204, 0.1);
}

/* --- MOBILE HEADER --- */
.mobile-header {
    display: none; justify-content: space-between; align-items: center;
    height: 60px; padding: 0 20px; position: fixed; top: 0; left: 0; right: 0;
    background-color: rgba(5, 10, 20, 0.90);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color); z-index: 9999;
}

/* --- BOTTOM NAV --- */
.bottom-nav {
    display: none; justify-content: space-around; align-items: center;
    height: var(--bottom-nav-height); background-color: var(--bg-color);
    position: fixed; bottom: 0; width: 100%;
    border-top: 1px solid var(--border-color); z-index: 100;
}
.nav-icon-mobile { font-size: 24px; padding: 10px; color: var(--text-primary); opacity: 0.6; }
.nav-icon-mobile.active { opacity: 1; color: var(--text-primary); }
.nav-icon-mobile img { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--bg-color); }
.nav-icon-mobile.active img { border: 1px solid var(--accent-color); }

/* --- COMPONENTS --- */
.btn {
    background: var(--accent-color); color: #fff; border: none;
    padding: 8px 20px; font-weight: 600; font-size: 14px;
    border-radius: var(--border-radius-M); cursor: pointer; transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; box-shadow: 0 0 10px rgba(255, 77, 77, 0.4); }

.btn-secondary { background: var(--card-bg); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: var(--border-color); }

/* Highlights */
.highlights-scroll { display: flex; gap: 20px; overflow-x: auto; padding: 10px 5px; margin-bottom: 30px; scrollbar-width: none; }
.highlight-item { text-align: center; cursor: pointer; text-decoration: none; display: block; }
.highlight-circle { 
    width: 70px; height: 70px; border-radius: 50%; 
    border: 1px solid var(--border-color); background: #0f141f;
    display: flex; align-items: center; justify-content: center; 
    font-size: 24px; margin: 0 auto 5px; transition: 0.2s;
}
.highlight-item:hover .highlight-circle { 
    border-color: var(--cyan-bright); 
    transform: scale(1.05); 
    box-shadow: 0 0 10px rgba(0, 229, 204, 0.3);
}
.highlight-text { font-size: 12px; color: var(--text-primary); font-weight: 500; }

/* Grid */
.grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; 
}
.grid-item { position: relative; padding-bottom: 100%; background: var(--card-bg); cursor: pointer; }
.grid-item img { position: absolute; top:0; left:0; width: 100%; height: 100%; object-fit: cover; }
.grid-item:hover img { opacity: 0.8; }

/* Post Card */
.post-card {
    background: transparent; border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px; padding-bottom: 20px; width: 100%;
}
.post-header { display: flex; align-items: center; padding: 10px 0; }
.user-avatar-small { width: 32px; height: 32px; border-radius: 50%; margin-right: 10px; object-fit: cover; border: 1px solid var(--border-color);}
.post-actions { padding: 10px 0; display: flex; gap: 16px; font-size: 24px; }
.post-actions span { cursor: pointer; transition: opacity 0.2s; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .sidebar { display: none; }
    
    .desktop-search-container { display: none !important; }

    .main-content { 
        margin-left: 0; width: 100%;
        padding-top: 130px !important; 
        padding-bottom: 80px;
    }

    .mobile-header, .bottom-nav { display: flex; }
    
    .container { 
        width: 100% !important;
        padding-left: 20px !important; 
        padding-right: 20px !important;
        box-sizing: border-box;
    }
    
    .feed-container { padding: 0 10px; max-width: 100%; }

    .highlights-scroll {
        margin-left: -20px; margin-right: -20px; 
        padding-left: 20px; padding-right: 20px; 
    }
}

/* --- AGENT TERMINAL STYLES --- */
.terminal-box {
    background-color: #0a0f1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 25px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 229, 204, 0.15);
    font-family: 'Courier New', Courier, monospace;
}

.terminal-header {
    background-color: #1a202c;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-traffic-lights {
    display: flex; gap: 6px; margin-right: 15px;
}
.light { width: 10px; height: 10px; border-radius: 50%; }
.light.red { background: #ff5f56; }
.light.yellow { background: #ffbd2e; }
.light.green { background: #27c93f; }

.terminal-title {
    color: #888; font-size: 11px; font-weight: 600; letter-spacing: 1px;
}

.terminal-body {
    padding: 15px;
    color: var(--cyan-bright);
    font-size: 12px;
    line-height: 1.6;
    height: 200px;
    overflow-y: auto;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb { background: #333; }
.terminal-body::-webkit-scrollbar-thumb:hover { background: var(--cyan-bright); }

.cursor {
    display: inline-block;
    width: 8px; height: 14px;
    background-color: var(--cyan-bright);
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.log-success { color: #00FF94; }
.log-warning { color: #FFD700; }
.log-error { color: #FF4D4D; }

/* --- EKLEMELER (CLAWNCH & FEED UPDATE) --- */

/* Clawnch İstatistik Kutuları (Dashboard İçin) */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px; margin-bottom: 30px; width: 100%;
}
.stat-card {
    background: var(--card-bg); border: 1px solid var(--border-color);
    padding: 20px; border-radius: 12px; position: relative; overflow: hidden;
}
.stat-label { color: var(--text-secondary); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-top: 5px; font-family: 'Courier New', monospace; }
/* Hafif Glow Efekti */
.stat-card::after { 
    content: ""; position: absolute; top: 0; right: 0; width: 60px; height: 60px;
    background: radial-gradient(circle, rgba(0, 229, 204, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Feed Sayfası Görsel Düzeltmesi */
.feed-image-container {
    width: 100%; background-color: #000;
    border: 1px solid var(--border-color); border-radius: 4px;
    overflow: hidden; margin-top: 10px;
    display: flex; justify-content: center; align-items: center;
}
.feed-image {
    width: 100%; height: auto; max-height: 600px;
    object-fit: contain; display: block;
}

/* Clawnch JSON Preview (Create Sayfası İçin) */
.code-preview {
    background: #000; border: 1px solid #333; padding: 15px;
    border-radius: 8px; font-family: 'Courier New', monospace;
    font-size: 11px; color: var(--beta-green); margin-top: 20px;
    display: block; white-space: pre-wrap; line-height: 1.4;
}