/* ==============================================================
   apps.omergoktas.net - Accessible Modern Design System
   Erişilebilirlik (WCAG 2.1 AAA) ve Modern Tasarım
   ============================================================== */

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-dark: #172554;
  --primary-light: #eff6ff;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-light: #64748b;
  --border: #cbd5e1;
  --border-focus: #2563eb;
  --success: #15803d;
  --success-bg: #f0fdf4;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --warning: #b45309;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 1.05rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: #000;
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  border: 2px solid #fff;
  transition: top 0.2s ease-in-out;
}
.skip-link:focus {
  top: 0;
  outline: 4px solid var(--accent);
}

/* Accessibility: Screen Reader Only */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navbar */
.site-header {
  background: var(--bg-card);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
}
.brand-logo {
  height: 52px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 8px;
}
.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}
.brand-text .brand-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
}

/* Navigation Toggle Button */
.nav-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border);
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  transition: all 0.15s ease;
}
.nav-toggle-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.nav-toggle-btn:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
}

/* Collapsible Navigation Menu */
.main-nav {
  display: none;
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  margin-top: 0.75rem;
  flex-direction: column;
  gap: 0.5rem;
}
.main-nav.nav-open {
  display: flex;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}
.nav-link-external {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  margin-top: 0.25rem;
}
.nav-link-external:hover {
  background: #d1fae5;
  color: #065f46;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #0369a1 100%);
  color: #ffffff;
  padding: 3.5rem 0;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero-content {
  max-width: 800px;
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
}
.hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.hero-slogan {
  font-size: 1.25rem;
  font-style: italic;
  opacity: 0.95;
  margin-bottom: 1.25rem;
  color: #e0f2fe;
}
.hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 1.75rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
  min-width: 48px;
}
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}
.btn-light {
  background-color: #ffffff;
  color: var(--primary-dark);
}
.btn-light:hover {
  background-color: #f1f5f9;
}
.btn-outline-light {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}
.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  min-height: 38px;
}
.btn-danger {
  background: var(--error);
  color: #fff;
}
.btn-danger:hover {
  background: #991b1b;
}

/* Sections */
.section {
  padding: 2.5rem 0;
}
.section-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.35rem;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* Search and Filters */
.filter-bar {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}
.filter-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}
.form-control {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  min-height: 48px;
  transition: border-color 0.15s ease;
}
.form-control:focus {
  border-color: var(--border-focus);
}

/* App Cards Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}
.app-card-featured {
  border: 2px solid #3b82f6;
  background: linear-gradient(to bottom, #ffffff, #f0f7ff);
}
.app-badge-featured {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
}
.app-card-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.app-icon {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.app-meta h3 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}
.app-meta a {
  color: var(--text-main);
  text-decoration: none;
}
.app-meta a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.app-version {
  display: inline-block;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}
.app-platforms {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.platform-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: #e0e7ff;
  color: #3730a3;
}
.platform-tag.android {
  background: #dcfce7;
  color: #166534;
}
.platform-tag.windows {
  background: #e0f2fe;
  color: #075985;
}
.platform-tag.web {
  background: #fef3c7;
  color: #92400e;
}
.app-summary {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}
.app-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  min-height: 40px;
}
.store-btn-play {
  background: #107c41;
  color: #ffffff;
}
.store-btn-play:hover {
  background: #0b5c30;
}
.store-btn-ms {
  background: #0078d4;
  color: #ffffff;
}
.store-btn-ms:hover {
  background: #005a9e;
}
.store-btn-git {
  background: #24292f;
  color: #ffffff;
}
.store-btn-git:hover {
  background: #000000;
}
.store-btn-direct {
  background: #0284c7;
  color: #ffffff;
}
.store-btn-direct:hover {
  background: #0369a1;
}

/* About Box in Index */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: center;
  margin: 3rem 0;
}
.about-logo-wrapper {
  text-align: center;
}
.about-logo-large {
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
  border-radius: 12px;
}
.about-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}
.about-content .about-text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* Detail Page */
.detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.detail-top {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}
.detail-icon {
  width: 110px;
  height: 110px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid var(--border);
}
.detail-info {
  flex: 1;
  min-width: 280px;
}
.detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.detail-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.detail-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}
.prose {
  line-height: 1.8;
  color: var(--text-main);
  font-size: 1.08rem;
}
.prose h2, .prose h3, .prose h4 {
  color: var(--primary-dark);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
}
.prose p {
  margin-bottom: 1.25rem;
}
.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

/* Contact Form */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin: 2rem 0;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alert-success {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
}
.alert-error {
  background-color: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0 1.5rem 0;
  border-top: 4px solid var(--primary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-col p {
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover, .footer-links a:focus {
  color: #ffffff;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Admin Dashboard Specific Styles */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: #0f172a;
  color: #f8fafc;
  padding: 1.5rem 1rem;
  border-right: 1px solid #334155;
}
.admin-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: #1e293b;
  color: #ffffff;
}
.admin-main {
  background: #f1f5f9;
  padding: 2rem;
  overflow-y: auto;
}
.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background: #ffffff;
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stat-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-top: 0.5rem;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th, .table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text-main);
}
.table tr:last-child td {
  border-bottom: none;
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #075985; }

/* Responsive adjustments */
@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
  .about-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .filter-form {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
}
