:root {
  --bg-color: #0d1117; --text-main: #c9d1d9; --text-title: #ffffff; --text-muted: #8b949e;
  --card-bg: #161b22; --card-border: #30363d; --card-hover: #1f242c;
  --accent: #58a6ff; --accent-glow: rgba(88, 166, 255, 0.4);
}
[data-theme="light"] {
  --bg-color: #f6f8fa; --text-main: #24292f; --text-title: #000000; --text-muted: #57606a;
  --card-bg: #ffffff; --card-border: #d0d7de; --card-hover: #f3f4f6;
  --accent: #0969da; --accent-glow: rgba(9, 105, 218, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); transition: 0.3s; min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow-x: hidden; }

.bg-grid { position: fixed; inset: 0; z-index: -1; background-image: linear-gradient(var(--card-border) 1px, transparent 1px), linear-gradient(90deg, var(--card-border) 1px, transparent 1px); background-size: 50px 50px; opacity: 0.2; }
.bg-orb { position: fixed; width: 500px; height: 500px; border-radius: 50%; filter: blur(120px); z-index: -2; opacity: 0.15; }
.orb-1 { top: -150px; left: -150px; background: var(--accent); }
.orb-2 { bottom: -150px; right: -150px; background: #bc8cff; }

/* $$$ YENİ: ÜST İŞLEM ÇUBUĞU VE ARAMA KUTUSU $$$ */
.top-actions { position: absolute; top: 20px; right: 20px; display: flex; gap: 12px; align-items: center; z-index: 100; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-box input { width: 250px; padding: 12px 16px 12px 42px; border-radius: 25px; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text-main); outline: none; transition: 0.3s; font-family: 'Inter', sans-serif;}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

.theme-btn { background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); width: 45px; height: 45px; border-radius: 50%; cursor: pointer; font-size: 16px; transition: 0.2s; display: flex; align-items: center; justify-content: center;}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.05); }

.page-container { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 80px 20px 40px; }
.hero { text-align: center; margin-bottom: 60px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--card-bg); border: 1px solid var(--card-border); padding: 8px 16px; border-radius: 20px; font-size: 14px; margin-bottom: 20px; color: var(--accent); font-weight: 600; }
.hero h1 { font-size: 2.8rem; color: var(--text-title); margin-bottom: 15px; letter-spacing: -1px; }
.hero-text { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; line-height: 1.6; }
.hero-stats { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.stat-card { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border: 1px solid var(--card-border); padding: 12px 20px; border-radius: 12px; }
.stat-card i { font-size: 22px; color: var(--accent); }
.stat-card div { display: flex; flex-direction: column; text-align: left; }
.stat-card strong { font-size: 1.1rem; color: var(--text-title); }
.stat-card span { font-size: 0.8rem; color: var(--text-muted); }

.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 1.8rem; color: var(--text-title); margin-bottom: 8px; }
.section-title p { color: var(--text-muted); }

.grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

/* KART TASARIMI */
.box { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 24px; text-decoration: none; transition: 0.2s; position: relative; min-height: 220px; }
.box:hover { transform: translateY(-4px); background: var(--card-hover); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 15px var(--accent-glow); }

.card-top { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.card-icon-wrap { width: 56px; height: 56px; border-radius: 12px; background: var(--bg-color); border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 26px; color: var(--accent); overflow: hidden; flex-shrink: 0;}
.card-image { width: 100%; height: 100%; object-fit: cover; }
.card-text { font-size: 1.15rem; font-weight: 600; color: var(--text-title); margin-bottom: 8px; width: 100%; line-height: 1.4; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-subtext { font-size: 0.9rem; color: var(--text-muted); width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--card-border); }
.card-badge { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.card-arrow { color: var(--text-muted); font-size: 16px; transition: 0.2s; }
.box:hover .card-arrow { color: var(--accent); transform: translateX(4px); }

/* $$$ YENİ: LİSTE GÖRÜNÜMÜ (LIST VIEW) $$$ */
.grid-layout.list-view { display: flex; flex-direction: column; }
.grid-layout.list-view .box { flex-direction: row; align-items: center; min-height: 80px; padding: 15px 24px; }
.grid-layout.list-view .card-top { flex-direction: row; text-align: left; align-items: center; gap: 20px; }
.grid-layout.list-view .card-icon-wrap { margin-bottom: 0; width: 48px; height: 48px; }
.grid-layout.list-view .card-text { margin-bottom: 0; width: auto; max-width: 400px; -webkit-line-clamp: 1;}
.grid-layout.list-view .card-subtext { width: auto; margin-left: auto; margin-right: 20px;}
.grid-layout.list-view .card-bottom { margin-top: 0; padding-top: 0; border-top: none; width: auto; }
.grid-layout.list-view .qr-btn { display: none; /* Listede QR kalabalık yapmasın */ }

/* QR POPUP */
.qr-btn { position: absolute; top: 16px; right: 16px; color: var(--text-muted); font-size: 16px; transition: 0.2s; z-index: 5;}
.qr-btn:hover { color: var(--text-title); }
.qr-popup { position: absolute; top: 30px; right: -5px; width: 110px; height: 110px; background: white; padding: 5px; border-radius: 8px; border: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.4); opacity: 0; visibility: hidden; transition: 0.3s; transform: translateY(-10px); }
.qr-btn:hover .qr-popup { opacity: 1; visibility: visible; transform: translateY(0); }
.github-star { color: #e3b341 !important; }

.footer { text-align: center; padding: 30px 20px; border-top: 1px solid var(--card-border); color: var(--text-muted); font-size: 0.9rem; margin-top: auto; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--card-border); border-top: 3px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.loading-state { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 40px 0; }