@import url('./liquid-global.css');

/* --- Yoohoo Search Core Design System --- */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #000000;
  --text-secondary: #4a4a4a;
  --text-tertiary: #757575;
  --border-color: #e5e5e5;
  --accent-primary: #000000;
  --accent-hover: #333333;
  --accent-foreground: #ffffff;
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 2px 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);
  --knowledge-bg: #000000;
  --weather-bg: #000000;
}

body.dark-theme {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --border-color: #222222;
  --accent-primary: #ffffff;
  --accent-hover: #e5e5e5;
  --accent-foreground: #000000;
  --card-bg: #0d0d0d;
  --knowledge-bg: #111111;
  --weather-bg: #111111;
}

.search-bar.large {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 24px;
  border-radius: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-bar.large .search-input {
  padding: 18px 0;
  font-size: 18px;
}

.search-bar.large:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

body.dark-theme .search-bar.large {
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

/* Landing/Results Transitions */
.app-container.landing-mode .main-content {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.app-container.results-mode .main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.results-mode .header .search-wrapper {
  display: block;
  animation: slideDown 0.4s ease-out;
}

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

/* Modal System */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.setting-item label {
  font-size: 14px;
  font-weight: 500;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* Transitions Refined */
.app-container.results-mode .main-content {
  padding-top: 0; /* Header is already sticky */
}

.app-container.results-mode .results-container {
  padding-left: clamp(20px, 5vw, 150px);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .header-content { padding: 10px 16px; gap: 12px; }
  .auth-link { display: none; } /* Hide auth links on mobile header, usually moved to menu */
  .results-container { padding-left: 0 !important; }
  .filters-panel { overflow-x: auto; padding-left: 20px; padding-right: 20px; margin-left: -20px; margin-right: -20px; }
}

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Layout Shell --- */

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  background-image: radial-gradient(circle at 2px 2px, var(--border-color) 1px, transparent 0);
  background-size: 40px 40px;
}

body.dark-theme .app-container {
  background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header & Navigation --- */

.header {
  position: sticky;
  top: 0;
  background: rgba(var(--bg-rgb, 255, 255, 255), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transition: all 0.3s ease;
}

body.light-theme .header { --bg-rgb: 255, 255, 255; }
body.dark-theme .header { --bg-rgb: 0, 0, 0; }

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid var(--border-color);
  padding-left: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}

.search-wrapper {
  flex: 1;
  max-width: 600px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-sm);
}

.search-bar:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow);
  transform: translateY(-1px);
}

.search-bar:hover {
  border-color: var(--text-tertiary);
}

.search-bar.large {
  max-width: 800px;
  padding: 8px;
  border-radius: 24px;
  background: var(--bg-primary);
  box-shadow: var(--shadow-md);
}

.search-bar.large .search-input {
  font-size: 18px;
  padding: 16px 20px;
}

.search-bar.large .search-submit-btn {
  width: auto;
  padding: 0 24px;
  height: 54px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  gap: 10px;
}

.search-bar.large .search-submit-btn span {
  display: block;
}

#landing-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-weight: 500;
  color: var(--text-primary) !important;
}

.search-bar.suggestions-active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}


.search-input {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 0;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
}

/* Suggestions Dropdown */
.search-container-large, .search-wrapper {
  position: relative;
  width: 100%;
}

.suggestions-dropdown {
  position: absolute;
  top: calc(100% - 10px);
  left: 0;
  right: 0;
  background: rgba(var(--bg-rgb), 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  z-index: 1500;
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}

.search-bar:focus-within + .suggestions-dropdown:not(:empty),
.suggestions-dropdown.active {
  display: flex;
  visibility: visible;
  opacity: 1;
  border-color: var(--accent-primary);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 0 10px rgba(var(--bg-rgb), 0.1);
  transform: translateY(0);
}

.search-bar.large + .suggestions-dropdown {
  max-width: 100%;
  margin-top: -16px;
  border-radius: 0 0 24px 24px;
}


.suggestion-item {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 14px;
  animation: fadeInSuggestion 0.3s ease forwards;
}

.suggestion-item:hover, .suggestion-item.selected {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.suggestion-item i {
  color: var(--text-tertiary);
  width: 16px;
}

@keyframes fadeInSuggestion {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.clear-btn, .search-submit-btn, .icon-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--bg-tertiary);
}

.btn-primary, .btn-secondary {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--accent-foreground) !important;
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

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

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-primary);
}

/* Filters Panel */
.filters-panel {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  max-width: 800px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.filter-select:focus {
  border-color: var(--accent-primary);
}

.hidden { display: none !important; }

/* --- Modes Transformations --- */

.app-container.landing-mode {
  justify-content: center;
}

.app-container.landing-mode .header {
  position: absolute;
  width: 100%;
  background: transparent;
  backdrop-filter: none;
}

/* Breadcrumbs */
.breadcrumbs {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  padding: 8px 24px;
}

.breadcrumb-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.breadcrumb-content a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.breadcrumb-content a:hover {
  color: var(--accent-primary);
}

.breadcrumb-content i {
  color: var(--border-color);
}

.app-container.landing-mode .header .search-wrapper {
  display: none;
}

.app-container.landing-mode .main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding-bottom: 10vh;
}

.app-container.results-mode .header {
  border-bottom: 1px solid var(--border-color);
}

.app-container.results-mode .welcome-screen {
  display: none !important;
}

/* --- Welcome Screen --- */

.welcome-screen {
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-logo {
  color: var(--accent-primary);
  margin-bottom: 2rem;
}

.welcome-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.welcome-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

/* --- Results Styles --- */

.tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  padding: 0 10px;
}

.results-header {
  max-width: 1400px;
  margin: 0 auto 24px auto;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
}

.results-header h2 {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-secondary);
}

.query-highlight {
  color: var(--text-primary);
  font-weight: 700;
}


.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--text-primary) !important;
  outline: none;
  font-weight: 500;
}

.search-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.search-submit-btn {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-right: 6px;
}

.search-submit-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(var(--bg-rgb), 0.2);
}

.search-submit-btn i {
  width: 20px;
  height: 20px;
}

.search-bar.large .search-submit-btn {
  width: 120px;
  height: 52px;
  border-radius: 16px;
  gap: 8px;
}

.search-bar.large .search-submit-btn span {
  font-weight: 600;
}

.tab {
  padding: 12px 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.results-container {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 60px;
}

.result-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.result-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.result-card:hover::after {
  opacity: 1;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.result-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.result-source {
  font-size: 13px;
  color: var(--text-tertiary);
}

.result-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.result-snippet {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

/* --- Grids --- */

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1200px;
}

.image-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.image-card:hover {
  transform: scale(1.02);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.image-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.image-card:hover .image-thumbnail {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  backdrop-filter: blur(4px);
  color: #fff;
  opacity: 0;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-card:hover .image-overlay {
  opacity: 1;
}

.image-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.image-source-text {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
  text-transform: lowercase;
}

.image-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.video-thumbnail-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  opacity: 0;
  transition: all 0.3s;
}

.video-card:hover .video-play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-favicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.video-source {
  font-size: 13px;
  color: var(--text-tertiary);
}


/* GitHub Results Refinement */
.github-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}

.github-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.github-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.github-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-primary);
}

.github-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.github-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Immersive Weather */
.weather-full {
  width: 100%;
  max-width: 900px;
  margin-bottom: 30px;
}

.weather-card-large {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 60px 40px;
  border-radius: 32px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.weather-card-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

.weather-hero {
  position: relative;
  z-index: 2;
}

.weather-temp-large {
  font-size: 96px;
  font-weight: 800;
  margin: 10px 0;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.weather-condition-large {
  font-size: 24px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.weather-location {
  font-size: 16px;
  opacity: 0.9;
}

.weather-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weather-stat span {
  font-size: 12px;
  text-transform: uppercase;
  opacity: 0.7;
}

.weather-stat strong {
  font-size: 18px;
}

/* --- Enhanced Footer --- */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 100px 0 40px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 80px;
  margin-bottom: 80px;
}

.footer-brand-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-primary);
  text-decoration: none;
}

.footer-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 340px;
}

.creator-badge {
  display: inline-flex;
  flex-direction: column;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: fit-content;
  transition: all 0.3s;
}

.creator-badge:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.badge-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.badge-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-primary);
}

.footer-nav-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-column h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 24px;
}

.footer-column a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 14px;
  transition: all 0.2s;
}

.footer-column a:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

.footer-copyright {
  display: flex;
  align-items: center;
  gap: 12px;
}

.separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-color);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.social-icon, .social-link {
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.social-icon:hover, .social-link:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.social-icon i, .social-link i {
  width: 18px;
  height: 18px;
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr; gap: 60px; }
  .footer { padding: 80px 0 40px; }
}

@media (max-width: 768px) {
  .footer-nav-section { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 24px; text-align: center; }
  .header-actions .auth-group { display: none; }
}

/* Progress Bar */
.search-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-primary);
  z-index: 2000;
  transition: width 0.3s ease;
}

/* --- Dark Mode Auth Fixes --- */
body.dark-theme .btn-primary,
body.dark-theme .btn-secondary:not(.auth-link),
body.dark-theme .search-submit-btn {
  background: var(--text-primary);
  color: var(--bg-primary) !important;
}

body.dark-theme .btn-primary:hover,
body.dark-theme .search-submit-btn:hover {
  background: var(--text-secondary);
}

body.dark-theme .auth-link.btn-secondary {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Modal System */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Profile Card (About Page) --- */

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 48px;
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 40px;
  animation: slideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: rotate(15deg);
}

.theme-toggle-btn i {
  width: 20px;
  height: 20px;
}

body.light-theme .theme-toggle-btn .sun-icon { display: none; }
body.dark-theme .theme-toggle-btn .moon-icon { display: none; }
body.light-theme .theme-toggle-btn .moon-icon { display: block; }
body.dark-theme .theme-toggle-btn .sun-icon { display: block; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 40px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.profile-name {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.profile-tagline {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
}

.bio-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.bio-intro {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.bio-section strong {
  color: var(--accent-primary);
}

.skills-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.skills-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}

.skill-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s;
}

.skill-tag i {
  width: 18px;
  color: var(--accent-primary);
}

.skill-tag:hover {
  border-color: var(--accent-primary);
  transform: translateX(4px);
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-badge {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.profile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.profile-socials {
  display: flex;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.social-btn:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* --- Mobile Menu --- */

.hamburger-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s;
}

.hamburger-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--card-bg);
  z-index: 2200;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
}

.mobile-menu.active {
  right: 0;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-primary);
}

.mobile-nav-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.3s;
}

.mobile-nav-item i {
  color: var(--accent-primary);
}

.mobile-nav-item:hover {
  border-color: var(--accent-primary);
  background: var(--card-bg);
}

@media (max-width: 1024px) {
  .header-actions .action-group { display: none; }
  .hamburger-btn { display: flex; }
}

@media (max-width: 768px) {
  .profile-card { padding: 32px 24px; border-radius: 20px; }
  .profile-header { flex-direction: column; text-align: center; gap: 20px; }
  .profile-content { grid-template-columns: 1fr; gap: 40px; }
  .profile-footer { flex-direction: column; gap: 20px; text-align: center; }
}

/* --- AI Pro Marketing Section --- */
.ai-promo-section {
  display: flex;
  justify-content: center;
  padding: 80px 24px;
  background: transparent;
}

.promo-card {
  max-width: 600px;
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 40px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.promo-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.promo-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.promo-icon {
  width: 48px !important;
  height: 48px !important;
  color: var(--accent-primary);
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 16px;
}

.promo-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent-primary);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: 100px;
}

.promo-card h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.promo-card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
}

.promo-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

body.dark-theme .promo-cta {
  background: #ffffff;
  color: #000000;
}

@media (max-width: 768px) {
  .promo-card { padding: 32px 24px; }
  .promo-card h3 { font-size: 24px; }
}
