:root {
    /* Modern Color Palette - Mavi Tema */
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(148, 163, 184, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: rgba(203, 213, 225, 0.6);
    --text-primary-contrast: #0f172a;
    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --border-primary: rgba(148, 163, 184, 0.2);
    --border-secondary: rgba(148, 163, 184, 0.1);
    --border-accent: rgba(59, 130, 246, 0.3);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-bg: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background & Container (from newdesign) */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-primary);
}
.bg-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg);
    animation: pulse-glow 8s ease-in-out infinite;
}
.bg-animated::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 0 4rem;
    text-align: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    z-index: 2; /* sits above starfield */
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-accent);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}
/* Unified button base */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1;
    min-height: 48px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    will-change: transform;
}

.btn-primary {
    /* Gradient primary to match newdesign */
    background: var(--gradient-primary);
    color: var(--text-primary-contrast);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    color: #e6fdf6;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(255,255,255,0.06);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

/* Focus states */
.btn-primary:focus, .btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

/* Features Section */
.features { padding: 6rem 0; }

.features-container { /* behave like newdesign .container */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header { text-align: center; margin-bottom: 80px; }

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-title { font-size: 1.4rem; font-weight: 600; margin-bottom: 16px; color: #fff; }

.feature-description { color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }

.feature-link {
    color: #00ff96;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.feature-link:hover { color: #00ccff; transform: translateX(4px); }

/* Workflows Section (from newdesign) */
.workflows { padding: 6rem 0; }
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.workflow-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.workflow-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.workflow-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: var(--border-accent); }
.workflow-card:hover::before { opacity: 1; }
.workflow-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.workflow-icon { width: 3rem; height: 3rem; background: var(--gradient-primary); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.25rem; }
.workflow-title { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
.workflow-description { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }
.workflow-features { list-style: none; margin-bottom: 2rem; }
.workflow-features li { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; color: var(--text-secondary); font-size: .875rem; }
.workflow-features li::before { content: "✓"; color: var(--accent-success); font-weight: bold; }
.workflow-footer { display: flex; justify-content: space-between; align-items: center; }
.workflow-price { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); }

/* Pricing (from newdesign) */
.pricing { padding: 6rem 0; background: var(--bg-secondary); }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}
.pricing-card { background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: var(--radius-xl); padding: 2rem; position: relative; transition: all .3s ease; }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.pricing-popular { border: 2px solid var(--accent-primary); transform: scale(1.05); }
.popular-badge { position: absolute; top: -.75rem; left: 50%; transform: translateX(-50%); background: var(--gradient-primary); color: #fff; padding: .5rem 1rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.pricing-header { text-align: center; margin-bottom: 2rem; }
.pricing-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.pricing-price { font-size: 3rem; font-weight: 800; color: var(--text-primary); margin-bottom: .5rem; }
.pricing-period { color: var(--text-secondary); }
.pricing-features { list-style: none; margin-bottom: 2rem; }
.pricing-features li { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; color: var(--text-secondary); }
.pricing-features li::before { content: "✓"; color: var(--accent-success); font-weight: bold; }

/* Stats Section */
.stats { padding: 4rem 0; background: var(--bg-secondary); border-top: 1px solid var(--border-primary); border-bottom: 1px solid var(--border-primary); }
.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.stat-item { padding: 20px; }
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
}
.stat-label { color: var(--text-secondary); font-size: 1.05rem; font-weight: 500; }

/* CTA Section */
.cta { padding: 6rem 0; text-align: center; }
.cta-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}
.cta-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}
.cta-title { color: #fff; position: relative; z-index: 1; }
.cta-subtitle { color: rgba(255,255,255,0.9); position: relative; z-index: 1; }
.cta .btn-primary, .cta .btn-secondary { position: relative; z-index: 1; }

.cta-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-bottom: 24px; color: #fff; }
.cta-subtitle { font-size: 1.2rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 40px; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-glow { 0%,100%{opacity:.6; transform:scale(1)} 50%{opacity:1; transform:scale(1.05)} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-20px)} }

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-cta { flex-direction: column; align-items: center; }
    .btn-primary, .btn-secondary { width: 100%; max-width: 300px; justify-content: center; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-container { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* Page-specific navbar (match newdesign header) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
}

/* Hide global starfield only on home to match prototype */
.starfield { display: none; }

/* RTL Support */
/* When RTL is active we expect a class or body[dir="rtl"] applied globally */
body[dir="rtl"], body.rtl {
    direction: rtl;
    text-align: right;
}
body[dir="rtl"] .hero-cta, body.rtl .hero-cta { flex-direction: row-reverse; }
body[dir="rtl"] .feature-link, body.rtl .feature-link { flex-direction: row-reverse; }
body[dir="rtl"] .feature-link:hover, body.rtl .feature-link:hover { transform: translateX(-4px); }

/* Navbar fail-safe (home only) */
/* In case modern-navbar.css fails to load for any reason, ensure basic navbar layout works */
.navbar.header { /* keep consistent with modern-navbar */
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
}
.navbar .nav { display: flex; align-items: center; justify-content: space-between; height: 4rem; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.navbar .nav a { text-decoration: none; }
.navbar .nav-links { display: none; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.navbar .nav-link { text-decoration: none; color: var(--text-secondary); font-weight: 500; }
.navbar .nav-link:hover { color: var(--text-primary); }
.navbar .nav-buttons { display: none; gap: .75rem; }
.navbar .mobile-menu-btn { display: flex; }
@media (min-width: 768px) {
  .navbar .nav-links { display: flex !important; }
  .navbar .nav-buttons { display: flex !important; }
  .navbar .mobile-menu-btn { display: none; }
}
/* Dropdown visibility */
.navbar .dropdown { position: relative; }
.navbar .dropdown .dropdown-menu { position: absolute; top: calc(100% + .5rem); left: 0; background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: var(--radius-lg); min-width: 220px; padding: .5rem 0; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .2s ease; z-index: 60; }
.navbar .dropdown .dropdown-right { right: 0; left: auto; }
.navbar .nav-item.dropdown:hover > .dropdown-menu, .navbar .dropdown:hover > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* Explore (Fal.ai-like) */
.explore { padding: 6rem 0; }
.explore .explore-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.explore-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.explore-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-primary);
  border-radius: 9999px;
  color: var(--text-secondary);
  background: var(--bg-glass);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.chip:hover { border-color: var(--border-accent); color: var(--text-primary); }
.chip.active { background: rgba(59, 130, 246, 0.15); border-color: var(--border-accent); color: var(--accent-primary); }

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.model-cover { height: 140px; background: var(--gradient-secondary); }

.model-body { padding: 1rem; display: grid; gap: .5rem; }
.model-title { color: var(--text-primary); font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.model-desc { color: var(--text-secondary); font-size: .9rem; }

.model-footer { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem 1rem; }
.badge { font-size: .75rem; padding: .25rem .5rem; border-radius: 9999px; border: 1px solid var(--border-primary); color: var(--accent-primary); background: rgba(59,130,246,.1); }

.model-card:hover { transform: translateY(-4px); border-color: var(--border-accent); box-shadow: var(--shadow-lg); }

@media (max-width: 768px) {
  .explore-toolbar { flex-direction: column; align-items: stretch; }
}
