/* Import Premium Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=JetBrains+Mono:wght@100..800&family=Playfair+Display:wght@400..900&display=swap');

/* Import Premium Styles */
@import url('premium.css');

/* CSS Variables for Theme */
:root {
  /* Light theme colors */
  --background: 255 255 255;
  --foreground: 15 23 42;
  --card: 255 255 255;
  --card-foreground: 15 23 42;
  --popover: 255 255 255;
  --popover-foreground: 15 23 42;
  --primary: 15 23 42;
  --primary-foreground: 248 250 252;
  --secondary: 241 245 249;
  --secondary-foreground: 15 23 42;
  --muted: 241 245 249;
  --muted-foreground: 100 116 139;
  --accent: 241 245 249;
  --accent-foreground: 15 23 42;
  --destructive: 239 68 68;
  --destructive-foreground: 248 250 252;
  --border: 226 232 240;
  --input: 226 232 240;
  --ring: 15 23 42;
  --radius: 0.5rem;
}

[data-theme="dark"] {
  /* Dark theme colors */
  --background: 15 23 42;
  --foreground: 248 250 252;
  --card: 15 23 42;
  --card-foreground: 248 250 252;
  --popover: 15 23 42;
  --popover-foreground: 248 250 252;
  --primary: 248 250 252;
  --primary-foreground: 15 23 42;
  --secondary: 30 41 59;
  --secondary-foreground: 248 250 252;
  --muted: 30 41 59;
  --muted-foreground: 148 163 184;
  --accent: 30 41 59;
  --accent-foreground: 248 250 252;
  --destructive: 220 38 38;
  --destructive-foreground: 248 250 252;
  --border: 30 41 59;
  --input: 30 41 59;
  --ring: 212 212 216;
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: rgb(var(--background));
  color: rgb(var(--foreground));
  font-feature-settings: "rlig" 1, "calt" 1;
  line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.875rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.4;
}

h5 {
  font-size: 1.125rem;
  line-height: 1.5;
}

h6 {
  font-size: 1rem;
  line-height: 1.5;
}

p {
  line-height: 1.7;
}

a {
  color: rgb(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: rgba(var(--primary), 0.8);
}

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

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 4rem;
  }
}

/* Section Spacing */
.section-padding {
  padding: 3rem 0;
}

.section-padding-lg {
  padding: 4rem 0;
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 4rem 0;
  }
  
  .section-padding-lg {
    padding: 6rem 0;
  }
}

@media (min-width: 1280px) {
  .section-padding-lg {
    padding: 8rem 0;
  }
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid rgb(var(--ring));
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn-sm {
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
}

.btn-default {
  height: 2.5rem;
  padding: 0 1rem;
}

.btn-lg {
  height: 2.75rem;
  padding: 0 2rem;
  border-radius: 0.375rem;
}

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

.btn-primary:hover {
  background-color: rgba(var(--primary), 0.9);
  color: rgb(var(--primary-foreground));
}

.btn-secondary {
  background-color: rgb(var(--secondary));
  color: rgb(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: rgba(var(--secondary), 0.8);
  color: rgb(var(--secondary-foreground));
}

.btn-outline {
  border: 1px solid rgb(var(--border));
  background-color: rgb(var(--background));
  color: rgb(var(--foreground));
}

.btn-outline:hover {
  background-color: rgb(var(--accent));
  color: rgb(var(--accent-foreground));
}

.btn-ghost {
  background-color: transparent;
  color: rgb(var(--foreground));
}

.btn-ghost:hover {
  background-color: rgb(var(--accent));
  color: rgb(var(--accent-foreground));
}

/* Card Styles */
.card {
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--border));
  background-color: rgb(var(--card));
  color: rgb(var(--card-foreground));
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

.card-description {
  font-size: 0.875rem;
  color: rgb(var(--muted-foreground));
}

.card-content {
  padding: 1.5rem;
  padding-top: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  padding-top: 0;
}

.card-interactive {
  cursor: pointer;
  transition: all 0.3s ease;
}

.card-interactive:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.badge-secondary {
  background-color: rgb(var(--secondary));
  color: rgb(var(--secondary-foreground));
}

.badge-outline {
  border: 1px solid rgb(var(--border));
  color: rgb(var(--foreground));
}

/* Input Styles */
.input, .textarea {
  display: flex;
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid rgb(var(--input));
  background-color: rgb(var(--background));
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.input {
  height: 2.5rem;
}

.textarea {
  min-height: 5rem;
  resize: vertical;
}

.input:focus, .textarea:focus {
  outline: none;
  border-color: rgb(var(--ring));
  box-shadow: 0 0 0 2px rgba(var(--ring), 0.2);
}

.input::placeholder, .textarea::placeholder {
  color: rgb(var(--muted-foreground));
}

/* Alert Styles */
.alert {
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--border));
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
}

.alert-destructive {
  border-color: rgb(var(--destructive));
  background-color: rgba(var(--destructive), 0.05);
}

.alert-title {
  margin-bottom: 0.25rem;
  font-weight: 500;
  line-height: 1;
}

.alert-description {
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Header Styles */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgb(var(--border));
  background-color: rgba(var(--background), 0.95);
  backdrop-filter: blur(8px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.25rem;
  color: rgb(var(--foreground));
}

.logo-icon {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: rgb(var(--primary));
  color: rgb(var(--primary-foreground));
  font-size: 0.875rem;
  font-weight: bold;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(var(--foreground), 0.6);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: rgb(var(--foreground));
}

.actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Footer Styles */
.footer {
  border-top: 1px solid rgb(var(--border));
  background-color: rgb(var(--background));
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-section a {
  font-size: 0.875rem;
  color: rgb(var(--muted-foreground));
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: rgb(var(--foreground));
}

.footer-bottom {
  border-top: 1px solid rgb(var(--border));
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copyright {
  font-size: 0.875rem;
  color: rgb(var(--muted-foreground));
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-content {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 75%;
  max-width: 20rem;
  background-color: rgb(var(--background));
  border-left: 1px solid rgb(var(--border));
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.mobile-menu-nav a {
  padding: 0.75rem;
  border-radius: 0.375rem;
  color: rgb(var(--foreground));
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.mobile-menu-nav a:hover {
  background-color: rgb(var(--accent));
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 640px) {
  .sm\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .md\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .lg\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.text-muted-foreground { color: rgb(var(--muted-foreground)); }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }

.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.hidden { display: none; }

@media (min-width: 640px) {
  .sm\\:flex { display: flex; }
  .sm\\:flex-row { flex-direction: row; }
  .sm\\:block { display: block; }
}

@media (min-width: 768px) {
  .md\\:block { display: block; }
  .md\\:flex { display: flex; }
  .md\\:hidden { display: none; }
}

/* Background Colors */
.bg-muted { background-color: rgba(var(--muted), 0.5); }
.bg-primary { background-color: rgb(var(--primary)); }
.text-primary-foreground { color: rgb(var(--primary-foreground)); }

/* Icons */
.icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  vertical-align: middle;
}

.icon-sm { width: 0.875rem; height: 0.875rem; }
.icon-lg { width: 1.25rem; height: 1.25rem; }
.icon-xl { width: 1.5rem; height: 1.5rem; }

/* Loading Animation */
.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Form Validation */
.form-field {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-error {
  font-size: 0.875rem;
  color: rgb(var(--destructive));
  margin-top: 0.25rem;
}

.required::after {
  content: " *";
  color: rgb(var(--destructive));
}

/* Responsive Design */
@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .section-padding {
    padding: 2rem 0;
  }
  
  .section-padding-lg {
    padding: 3rem 0;
  }
}

/* Print Styles */
@media print {
  * {
    color: black !important;
    background: white !important;
  }
  
  .header, .footer, .btn, .mobile-menu {
    display: none !important;
  }
  
  a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }
}

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

/* Focus Styles */
*:focus-visible {
  outline: 2px solid rgb(var(--ring));
  outline-offset: 2px;
}
