/* assets/css/style.css - RinconGeek.net */
:root {
  --bg-primary:   #0a0a0a;
  --bg-secondary: #0f1419;
  --border:       #1f2937;
  --emerald:      #10b981;
  --emerald-dim:  rgba(16,185,129,0.15);
  --blue:         #3b82f6;
  --text-white:   #f9fafb;
  --text-gray:    #9ca3af;
  --text-dim:     #6b7280;
  --yellow:       #eab308;
  --purple:       #a855f7;
  --cyan:         #06b6d4;
  --orange:       #f97316;
  --radius:       0.5rem;
  --transition:   all 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-white);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.logo { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; font-weight: 700; }
.logo-icon { color: var(--emerald); font-size: 1.5rem; }
.logo span { background: linear-gradient(to right, var(--emerald), var(--blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a, .nav-links button { background: none; border: none; color: var(--text-gray); font-size: .95rem; cursor: pointer; transition: var(--transition); padding: 0; }
.nav-links a:hover, .nav-links button:hover { color: var(--emerald); }
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.2rem; border-radius: var(--radius); border: none; font-size: .95rem; font-weight: 500; cursor: pointer; transition: var(--transition); }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-emerald:hover { background: #059669; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-gray); }
.btn-outline:hover { background: #1f2937; color: var(--text-white); }
.btn-sm { padding: .35rem .9rem; font-size: .85rem; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.lang-toggle { display: flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-gray); background: none; cursor: pointer; font-size: .85rem; transition: var(--transition); }
.lang-toggle:hover { background: #1f2937; color: #fff; }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.mobile-menu { display: none; flex-direction: column; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.mobile-menu.open { display: flex; }

/* ── HERO ── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(to bottom, var(--bg-primary), #0f1419, var(--bg-primary));
  padding: 5rem 0;
  text-align: center;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M10 0L0 0 0 10' fill='none' stroke='rgba(100,255,218,0.05)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23g)'/%3E%3C/svg%3E");
  opacity: .25;
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: var(--emerald-dim); border: 1px solid rgba(16,185,129,.25); border-radius: 9999px; padding: .4rem 1rem; font-size: .85rem; color: var(--emerald); margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800; background: linear-gradient(to right, #fff, #a7f3d0, #bfdbfe); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 1.25rem; }
.hero p { font-size: 1.1rem; color: var(--text-gray); max-width: 640px; margin: 0 auto 2rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-image { margin-top: 3rem; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: 0 25px 50px rgba(0,0,0,.5); }
.hero-image img { width: 100%; height: 320px; object-fit: cover; }

/* ── SECTIONS ── */
section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; margin-bottom: .75rem; }
.section-header p { color: var(--text-gray); max-width: 600px; margin: 0 auto; }

/* ── CARDS GRID ── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-6 { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }

.card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); cursor: pointer; }
.card:hover { border-color: rgba(16,185,129,.4); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-thumb img { transform: scale(1.05); }
.card-badge { position: absolute; top: .75rem; right: .75rem; padding: .25rem .75rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; color: #fff; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; transition: var(--transition); }
.card:hover .card-title { color: var(--emerald); }
.card-excerpt { color: var(--text-gray); font-size: .9rem; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--text-dim); }
.card-meta span { display: flex; align-items: center; gap: .3rem; }

/* ── CATEGORY CARD ── */
.cat-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; transition: var(--transition); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .5rem; min-height: 140px; justify-content: center; }
.cat-card:hover { border-color: rgba(16,185,129,.4); transform: scale(1.04); }
.cat-icon { font-size: 2rem; margin-bottom: .25rem; }
.cat-name { font-weight: 600; font-size: .95rem; }
.cat-count { font-size: .8rem; color: var(--text-dim); }

/* ── FEATURED BADGE ── */
.featured-badge { background: linear-gradient(to right, var(--emerald), var(--blue)); color: #fff; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 9999px; text-transform: uppercase; }

/* ── HERO ALT COLORS PER CATEGORY ── */
.color-emerald { background: var(--emerald); }
.color-blue     { background: var(--blue); }
.color-yellow   { background: var(--yellow); }
.color-purple   { background: var(--purple); }
.color-cyan     { background: var(--cyan); }
.color-orange   { background: var(--orange); }

/* ── FORMS ── */
.form-wrap { max-width: 480px; margin: 0 auto; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; }
.form-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .5rem; }
.form-sub { color: var(--text-gray); font-size: .9rem; margin-bottom: 1.75rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .9rem; color: var(--text-gray); margin-bottom: .4rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: #111827; border: 1px solid var(--border);
  color: #fff; border-radius: var(--radius); padding: .65rem 1rem;
  font-size: .95rem; transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-dim);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: .8rem; color: var(--text-dim); margin-top: .35rem; }
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.alert-error   { background: rgba(220,38,38,.15); border: 1px solid rgba(220,38,38,.3); color: #fca5a5; }
.form-link { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--text-gray); }
.form-link a { color: var(--emerald); }

/* ── FOOTER ── */
.site-footer { background: var(--bg-primary); border-top: 1px solid var(--border); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { color: var(--text-gray); font-size: .9rem; margin-bottom: 1.25rem; }
.social-links { display: flex; gap: .6rem; }
.social-btn { width: 36px; height: 36px; background: #1f2937; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); border: none; cursor: pointer; color: #fff; font-size: .9rem; }
.social-btn:hover { background: var(--emerald); }
.footer-col h4 { font-weight: 600; margin-bottom: 1rem; }
.footer-col a, .footer-col button { display: block; background: none; border: none; color: var(--text-gray); font-size: .9rem; cursor: pointer; padding: 0; margin-bottom: .5rem; text-align: left; transition: var(--transition); }
.footer-col a:hover, .footer-col button:hover { color: var(--emerald); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { color: var(--text-dim); font-size: .85rem; }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { color: var(--text-dim); font-size: .85rem; transition: var(--transition); }
.footer-legal a:hover { color: var(--emerald); }

/* ── ADMIN PANEL ── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg-secondary); border-right: 1px solid var(--border); padding: 1.5rem 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .logo { padding: 0 1.25rem 1.5rem; }
.admin-nav a { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem; color: var(--text-gray); font-size: .9rem; transition: var(--transition); border-left: 3px solid transparent; }
.admin-nav a:hover, .admin-nav a.active { color: var(--emerald); background: var(--emerald-dim); border-left-color: var(--emerald); }
.admin-nav .nav-section { padding: .5rem 1.25rem; font-size: .75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; margin-top: 1rem; }
.admin-main { padding: 2rem; overflow-y: auto; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.admin-topbar h1 { font-size: 1.5rem; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.stat-card .stat-label { font-size: .8rem; color: var(--text-dim); margin-bottom: .5rem; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; }
.stat-card .stat-icon { font-size: 1.5rem; margin-bottom: .5rem; }

/* ── TABLE ── */
.table-wrap { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead { background: #111827; }
th { padding: .75rem 1rem; text-align: left; font-size: .8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
td { padding: .85rem 1rem; border-top: 1px solid var(--border); font-size: .9rem; color: var(--text-gray); }
tr:hover td { background: rgba(255,255,255,.02); }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.badge-green  { background: rgba(16,185,129,.2); color: var(--emerald); }
.badge-red    { background: rgba(220,38,38,.2); color: #f87171; }
.badge-yellow { background: rgba(234,179,8,.2); color: #fbbf24; }
.badge-blue   { background: rgba(59,130,246,.2); color: #93c5fd; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; }
.page-btn { padding: .5rem .9rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-gray); font-size: .9rem; transition: var(--transition); }
.page-btn:hover, .page-btn.active { background: var(--emerald); border-color: var(--emerald); color: #fff; }

/* ── PROJECT DETAIL ── */
.project-detail { max-width: 860px; margin: 0 auto; padding: 2rem 0; }
.project-header { margin-bottom: 2rem; }
.project-header h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }
.project-meta-bar { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; color: var(--text-dim); font-size: .9rem; }
.project-content { color: var(--text-gray); line-height: 1.8; }
.project-content h2 { color: #fff; font-size: 1.4rem; margin: 2rem 0 1rem; }
.project-content h3 { color: #e5e7eb; font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.project-content p  { margin-bottom: 1rem; }
.project-content pre { background: #111827; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin: 1.5rem 0; }
.project-content code { font-family: 'Fira Code', monospace; font-size: .9rem; color: var(--emerald); }
.project-content pre code { color: #e5e7eb; }

/* ── COMMENT SECTION ── */
.comments-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comment { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--emerald-dim); display: flex; align-items: center; justify-content: center; color: var(--emerald); font-weight: 700; flex-shrink: 0; font-size: .9rem; }
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: .9rem; }
.comment-time { font-size: .8rem; color: var(--text-dim); margin-left: .75rem; }
.comment-text { color: var(--text-gray); font-size: .9rem; margin-top: .35rem; }

/* ── USER DASHBOARD ── */
.dashboard { max-width: 900px; margin: 0 auto; padding: 2rem 0; }
.dashboard-header { margin-bottom: 2rem; }
.user-profile { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 2rem; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(to br, var(--emerald), var(--blue)); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; }

/* ── SEARCH BAR ── */
.search-bar { display: flex; gap: .75rem; max-width: 600px; margin: 0 auto 2.5rem; }
.search-bar input { flex: 1; background: #111827; border: 1px solid var(--border); color: #fff; border-radius: var(--radius); padding: .65rem 1rem; font-size: .95rem; }
.search-bar input:focus { outline: none; border-color: var(--emerald); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .hero { padding: 3rem 0; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
