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

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --success: #10b981;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* Navbar */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef2ff;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: #059669;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: var(--white);
  padding: 84px 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79, 70, 229, 0.28);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #e0e7ff;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.85rem;
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 16px;
  line-height: 1.2;
}

.hero p {
  color: #cbd5e1;
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

.search-box {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  background: var(--white);
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 8px;
}

/* Section Headers */
.section {
  padding: 70px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--secondary);
}

.section-header p {
  color: var(--text-muted);
  margin-top: 4px;
}

/* Category Filter Pills */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Themes Grid & Cards */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 28px;
}

.theme-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.theme-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.theme-thumb {
  position: relative;
  height: 215px;
  overflow: hidden;
  background: #e2e8f0;
}

.theme-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.theme-card:hover .theme-thumb img {
  transform: scale(1.05);
}

.free-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--success);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: #eef2ff;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 10px;
  width: fit-content;
}

.theme-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.theme-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}

.theme-title a:hover {
  color: var(--primary);
}

.theme-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
  flex: 1;
}

.theme-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Features Strip */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-box {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: #eef2ff;
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.feature-box h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Theme Details Page */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 600;
}

.details-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

.details-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.details-preview-img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.features-list li i {
  color: var(--success);
}

.meta-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.meta-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.meta-table td:first-child {
  color: var(--text-muted);
}

.meta-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Live Preview Page */
.preview-body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1e293b;
}

.preview-topbar {
  background: var(--secondary);
  color: var(--white);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
  gap: 10px;
}

.device-switchers {
  display: flex;
  gap: 8px;
}

.device-btn {
  background: #334155;
  color: #cbd5e1;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.device-btn.active {
  background: var(--primary);
  color: var(--white);
}

.preview-frame-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--white);
  transition: width 0.3s ease, height 0.3s ease;
}

#preview-iframe.tablet {
  width: 768px;
  height: 92%;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

#preview-iframe.mobile {
  width: 375px;
  height: 90%;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Contact & About */
.page-banner {
  background: var(--secondary);
  color: var(--white);
  padding: 55px 0;
  text-align: center;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
}

/* Footer */
.footer {
  background: var(--secondary);
  color: #94a3b8;
  padding: 50px 0 25px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 35px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 860px) {
  .details-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    display: flex;
  }
  .features-list {
    grid-template-columns: 1fr;
  }
}