* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Verdana, sans-serif; font-size: 13px; background: #f5f5f5; color: #333; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; color: #cc0000; }
img { max-width: 100%; }

/* HEADER */
#header { background: linear-gradient(135deg, #cc0000 0%, #990000 100%); padding: 10px 0; }
#header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
#logo { display: flex; align-items: center; gap: 12px; }
#logo h1 { color: #fff; font-size: 28px; font-weight: bold; letter-spacing: 1px; text-shadow: 1px 1px 3px rgba(0,0,0,0.4); }
#logo .tagline { color: #ffdddd; font-size: 11px; }
#header-right { text-align: right; color: #fff; font-size: 12px; }
#header-right a { color: #ffe; }

/* NAVIGATION */
#navbar { background: #222; border-bottom: 3px solid #cc0000; }
#navbar ul { display: flex; flex-wrap: wrap; list-style: none; }
#navbar ul li a { display: block; padding: 9px 14px; color: #fff; font-size: 13px; font-weight: bold; transition: background 0.2s; }
#navbar ul li a:hover, #navbar ul li a.active { background: #cc0000; text-decoration: none; }

/* TICKER */
#ticker { background: #fff3cd; border-bottom: 1px solid #ffc107; padding: 6px 0; overflow: hidden; }
#ticker .label { background: #cc0000; color: #fff; padding: 2px 10px; font-weight: bold; font-size: 12px; margin-right: 10px; white-space: nowrap; }
#ticker marquee { display: inline-block; width: calc(100% - 120px); vertical-align: middle; }
#ticker marquee a { color: #cc0000; font-weight: bold; margin-right: 30px; }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 0 10px; }

/* MAIN LAYOUT */
#main { padding: 12px 0; }
#main .layout { display: grid; grid-template-columns: 1fr 310px; gap: 12px; }

/* ADSENSE PLACEHOLDER */
.ad-banner { background: #e8e8e8; border: 1px dashed #aaa; text-align: center; color: #999; font-size: 11px; padding: 8px; margin-bottom: 12px; }
.ad-banner-728 { height: 90px; line-height: 72px; }
.ad-banner-300 { height: 250px; line-height: 232px; }

/* CATEGORY BOXES */
.cat-box { background: #fff; border: 1px solid #ddd; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.cat-box-header { padding: 7px 10px; font-size: 14px; font-weight: bold; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.cat-box-header a { color: #ffe; font-size: 11px; font-weight: normal; }
.cat-box-body { padding: 4px 0; }
.cat-box-body table { width: 100%; border-collapse: collapse; }
.cat-box-body table tr:hover td { background: #f9f5ff; }
.cat-box-body table td { padding: 5px 10px; border-bottom: 1px solid #f0f0f0; font-size: 12.5px; vertical-align: top; line-height: 1.5; }
.cat-box-body table td:last-child { width: 70px; text-align: right; white-space: nowrap; color: #888; font-size: 11px; }
.cat-box-body table td a { color: #0055aa; }
.cat-box-body table td a:hover { color: #cc0000; }

/* COLOR THEMES */
.color-red .cat-box-header    { background: #cc0000; }
.color-blue .cat-box-header   { background: #006699; }
.color-orange .cat-box-header { background: #cc6600; }
.color-purple .cat-box-header { background: #660099; }
.color-green .cat-box-header  { background: #336600; }
.color-navy .cat-box-header   { background: #003366; }
.color-teal .cat-box-header   { background: #006666; }
.color-brown .cat-box-header  { background: #663300; }

/* BADGES */
.badge-new { background: #cc0000; color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 2px; margin-left: 4px; font-weight: bold; vertical-align: middle; }
.badge-imp { background: #ff6600; color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 2px; margin-left: 4px; font-weight: bold; vertical-align: middle; }

/* SIDEBAR */
#sidebar .side-box { background: #fff; border: 1px solid #ddd; margin-bottom: 12px; }
#sidebar .side-box-header { background: #003366; color: #fff; padding: 7px 10px; font-weight: bold; font-size: 13px; }
#sidebar .side-box-body ul { list-style: none; padding: 6px 0; }
#sidebar .side-box-body ul li { border-bottom: 1px solid #f0f0f0; }
#sidebar .side-box-body ul li a { display: block; padding: 5px 10px; font-size: 12px; color: #0055aa; }
#sidebar .side-box-body ul li a:hover { background: #f5f5ff; color: #cc0000; text-decoration: none; }
.search-box { padding: 10px; }
.search-box input[type=text] { width: 100%; padding: 7px 10px; border: 1px solid #ccc; font-size: 13px; border-radius: 3px; }
.search-box button { width: 100%; margin-top: 6px; background: #cc0000; color: #fff; border: none; padding: 7px; font-size: 13px; font-weight: bold; cursor: pointer; border-radius: 3px; }
.search-box button:hover { background: #990000; }

/* POST PAGE */
.post-container { background: #fff; border: 1px solid #ddd; padding: 15px; }
.post-title { font-size: 20px; font-weight: bold; color: #cc0000; border-bottom: 2px solid #cc0000; padding-bottom: 8px; margin-bottom: 12px; }
.post-meta { color: #888; font-size: 11px; margin-bottom: 12px; }
.post-meta span { margin-right: 15px; }
.post-body { line-height: 1.8; }
.post-body h3 { color: #003366; margin: 12px 0 6px; font-size: 14px; }
.post-body table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.post-body table th { background: #003366; color: #fff; padding: 6px 10px; text-align: left; }
.post-body table td { border: 1px solid #ddd; padding: 6px 10px; }
.post-body table tr:nth-child(even) td { background: #f8f8f8; }
.imp-links { margin-top: 15px; background: #f0f8ff; border: 1px solid #b0d0ff; border-radius: 4px; padding: 10px; }
.imp-links h4 { color: #003366; font-size: 13px; margin-bottom: 8px; border-bottom: 1px solid #b0d0ff; padding-bottom: 5px; }
.imp-links table { width: 100%; border-collapse: collapse; }
.imp-links table td { border: 1px solid #cce; padding: 6px 8px; font-size: 12px; }
.imp-links table td:first-child { font-weight: bold; color: #333; width: 55%; }
.imp-links table a { color: #cc0000; font-weight: bold; }
.imp-links table a:hover { text-decoration: underline; }

/* CATEGORY PAGE */
.page-title { background: #cc0000; color: #fff; padding: 8px 12px; font-size: 15px; font-weight: bold; margin-bottom: 12px; }
.post-list { background: #fff; border: 1px solid #ddd; }
.post-list-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-bottom: 1px solid #f0f0f0; }
.post-list-item:hover { background: #f9f5ff; }
.post-list-item a { color: #0055aa; font-size: 13px; }
.post-list-item .date { color: #888; font-size: 11px; white-space: nowrap; margin-left: 10px; }
.pagination { display: flex; gap: 4px; padding: 12px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 5px 10px; border: 1px solid #ddd; background: #fff; color: #0066cc; font-size: 12px; }
.pagination .current { background: #cc0000; color: #fff; border-color: #cc0000; }
.pagination a:hover { background: #f0f0f0; text-decoration: none; }

/* BREADCRUMB */
.breadcrumb { font-size: 12px; color: #888; padding: 6px 0 10px; }
.breadcrumb a { color: #0066cc; }
.breadcrumb span { margin: 0 5px; }

/* SEARCH RESULTS */
.search-results-header { margin-bottom: 10px; font-size: 13px; color: #666; }
.search-results-header strong { color: #cc0000; }

/* FOOTER */
#footer { background: #222; color: #ccc; padding: 20px 0 10px; margin-top: 20px; }
#footer .footer-links { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-bottom: 15px; }
#footer .footer-col h4 { color: #fff; font-size: 13px; margin-bottom: 8px; border-bottom: 1px solid #444; padding-bottom: 4px; }
#footer .footer-col ul { list-style: none; }
#footer .footer-col ul li { margin-bottom: 4px; }
#footer .footer-col ul li a { color: #bbb; font-size: 12px; }
#footer .footer-col ul li a:hover { color: #fff; }
#footer .footer-bottom { border-top: 1px solid #444; padding-top: 10px; text-align: center; font-size: 11px; color: #888; }
#footer .footer-bottom a { color: #aaa; }

/* ADMIN PANEL */
.admin-body { background: #f4f4f4; min-height: 100vh; }
#admin-header { background: #1a1a2e; color: #fff; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
#admin-header h1 { font-size: 18px; color: #e94560; }
#admin-header a { color: #aaa; font-size: 13px; }
#admin-header a:hover { color: #fff; }
#admin-layout { display: flex; min-height: calc(100vh - 52px); }
#admin-sidebar { width: 200px; background: #16213e; flex-shrink: 0; }
#admin-sidebar ul { list-style: none; padding: 10px 0; }
#admin-sidebar ul li a { display: block; padding: 10px 18px; color: #ccc; font-size: 13px; border-left: 3px solid transparent; transition: all 0.2s; }
#admin-sidebar ul li a:hover, #admin-sidebar ul li a.active { background: #0f3460; color: #fff; border-left-color: #e94560; text-decoration: none; }
#admin-content { flex: 1; padding: 20px; }
.admin-card { background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); padding: 20px; margin-bottom: 20px; }
.admin-card h2 { font-size: 16px; color: #1a1a2e; margin-bottom: 15px; border-bottom: 2px solid #e94560; padding-bottom: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { background: linear-gradient(135deg, #cc0000, #990000); color: #fff; padding: 18px; border-radius: 6px; text-align: center; }
.stat-card.blue { background: linear-gradient(135deg, #006699, #004477); }
.stat-card.orange { background: linear-gradient(135deg, #cc6600, #994400); }
.stat-card.green { background: linear-gradient(135deg, #336600, #224400); }
.stat-card h3 { font-size: 30px; margin-bottom: 4px; }
.stat-card p { font-size: 12px; opacity: 0.85; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #1a1a2e; color: #fff; padding: 9px 12px; text-align: left; font-size: 12px; }
.admin-table td { padding: 8px 12px; border-bottom: 1px solid #eee; font-size: 13px; vertical-align: middle; }
.admin-table tr:hover td { background: #f9f9f9; }
.btn { display: inline-block; padding: 6px 14px; border-radius: 4px; font-size: 12px; font-weight: bold; cursor: pointer; text-decoration: none; border: none; }
.btn-primary { background: #cc0000; color: #fff; }
.btn-primary:hover { background: #990000; color: #fff; }
.btn-success { background: #336600; color: #fff; }
.btn-success:hover { background: #224400; color: #fff; }
.btn-warning { background: #cc6600; color: #fff; }
.btn-warning:hover { background: #994400; color: #fff; }
.btn-danger { background: #990000; color: #fff; }
.btn-danger:hover { background: #660000; color: #fff; }
.btn-secondary { background: #666; color: #fff; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 13px; color: #333; }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password], .form-group input[type=url], .form-group select, .form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; font-family: Arial, sans-serif; }
.form-group textarea { height: 200px; resize: vertical; }
.form-group select { background: #fff; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 15px; font-size: 13px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1a1a2e, #16213e); }
.login-box { background: #fff; padding: 35px 30px; border-radius: 8px; width: 360px; box-shadow: 0 5px 25px rgba(0,0,0,0.3); }
.login-box h2 { text-align: center; color: #cc0000; font-size: 20px; margin-bottom: 8px; }
.login-box .site-name { text-align: center; color: #666; font-size: 13px; margin-bottom: 25px; }
.checkbox-group { display: flex; align-items: center; gap: 6px; }
.checkbox-group input { width: auto; }

/* RESPONSIVE */
@media (max-width: 768px) {
  #main .layout { grid-template-columns: 1fr; }
  #sidebar { order: -1; }
  #navbar ul { flex-direction: column; }
  #navbar ul li a { padding: 7px 12px; }
  #logo h1 { font-size: 20px; }
  .form-row { grid-template-columns: 1fr; }
  #admin-layout { flex-direction: column; }
  #admin-sidebar { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
