/* 
 * Spoonworld - Hauptstylesheet
 * Enthält allgemeine Styles für das gesamte Layout
 */

:root {
  /* Farbpalette */
  --bg-primary: #f8f9fa;
  --bg-secondary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --accent-primary: #06b6d4;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.1);
  
  /* Typografie */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --line-height: 1.6;
  
  /* Layout */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.05);
}

/* Darkmode */
[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #e9ecef;
  --text-secondary: #ced4da;
  --text-muted: #adb5bd;
  --card-bg: rgba(30, 30, 30, 0.8);
  --card-border: rgba(255, 255, 255, 0.1);
}

/* Barrierefreiheit */
[data-high-contrast="true"] {
  --text-primary: #ffffff;
  --bg-primary: #000000;
  --bg-secondary: #121212;
  --card-bg: #121212;
  --card-border: rgba(255, 255, 255, 0.3);
}

[data-bold-text="true"] {
  font-weight: 500;
}

[data-font="system"] {
  --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-font="serif"] {
  --font-family: Georgia, Cambria, 'Times New Roman', Times, serif;
}

[data-reduce-motion="true"] * {
  transition: none !important;
  animation: none !important;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  line-height: var(--line-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(var(--bg-primary-rgb, 18, 18, 18), 0.8);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-text {
  margin-left: 15px;
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: -2px;
}

.typewriter-text {
  color: var(--accent-primary);
  font-size: 1rem;
  height: 1.2em;
  margin: 0;
  overflow: hidden;
  border-right: 3px solid var(--accent-primary);
  white-space: nowrap;
  letter-spacing: 0.05em;
  animation: typing 3.5s steps(30, end), blink-caret 0.7s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent-primary) }
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.brand-info h1 {
  margin: 0;
  font-size: 2.2rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info .tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

nav.primary {
  display: flex;
  gap: 16px;
}

nav.primary a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

nav.primary a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-sm);
}

nav.primary a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

nav.primary a.active {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: var(--shadow-md);
}

.burger {
  display: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Settings Button */
.settings-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-right: 12px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.settings-btn:hover {
  background: rgba(6,182,212,0.2);
  transform: rotate(30deg);
  color: var(--accent-primary);
}

/* User Account & Profile */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.profile-icon:hover {
  transform: scale(1.05);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 260px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  margin-top: 12px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: var(--card-bg);
  transform: rotate(45deg);
  border-top: 1px solid var(--card-border);
  border-left: 1px solid var(--card-border);
}

.dropdown-menu-header {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 8px;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 12px;
}

.user-details h4 {
  margin: 0;
  font-size: 1rem;
}

.user-details p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.dropdown-menu-body {
  padding: 8px 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--card-border);
  margin: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--accent-primary);
}

.dropdown-item svg {
  margin-right: 12px;
  color: var(--text-muted);
}

.dropdown-item:hover svg {
  color: var(--accent-primary);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  padding: 60px 0 30px;
  position: relative;
}

.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.footer-wave svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 120px;
  transform: rotateY(180deg);
}

.footer-wave path {
  fill: var(--bg-secondary);
}

.footer-newsletter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  margin-bottom: 60px;
  transform: translateY(-80px);
}

.newsletter-content {
  max-width: 60%;
}

.newsletter-content h3 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.newsletter-content .highlight {
  color: var(--accent-primary);
}

.newsletter-form {
  display: flex;
  max-width: 40%;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: rgba(0,0,0,0.2);
  color: white;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
}

.footer-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-tagline {
  color: #94a3b8;
  margin-bottom: 16px;
}

.footer-about {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--accent-primary);
  transform: translateY(-3px);
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
  padding-left: 5px;
}

.contact-info {
  list-style: none;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.contact-item a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-item a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8;
}

.payment-methods {
  margin-top: 20px;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.payment-icon {
  height: 24px;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.payment-icon:hover {
  opacity: 1;
}

/* Hero Section */
.hero {
  padding: 80px 40px;
  margin-bottom: 60px;
  text-align: center;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-lg);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--accent-primary);
  backdrop-filter: blur(10px);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Custom Scrollbar - Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
  background: linear-gradient(180deg, var(--accent-secondary), var(--accent-primary));
  background-clip: padding-box;
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) rgba(255,255,255,0.05);
}

/* Responsive */
@media (max-width:1200px){
  .container{width:95%;padding:0 16px;}
  .modal-panel{width:90%;}
  .product-detail{gap:24px;}
}

/* Tablet */
@media (max-width:992px){
  .container{width:95%}
  .nav{padding:12px 0}
  
  /* Typography */
  h1{font-size:calc(1.8rem + 1vw)}
  h2{font-size:calc(1.5rem + 0.5vw)}
  .hero h1{font-size:2.8rem}
  
  /* Layout */
  .grid-3{grid-template-columns:repeat(2, 1fr)}
  .product-detail{grid-template-columns:1fr}
  .faq-container{grid-template-columns:1fr}
  .product-actions{flex-direction:row;justify-content:space-between}
  .product-actions .btn{flex:1}
  
  /* Settings Modal */
  .settings-form .form-grid.two-col{grid-template-columns:1fr}
  
  /* Footer */
  .footer-newsletter{flex-direction:column;transform:translateY(-40px)}
  .newsletter-form{max-width:100%;margin-top:16px}
}

/* Mobile Large */
@media (max-width:768px){
  html{font-size:15px}
  .container{width:100%;padding:0 16px}
  
  /* Navigation */
  .nav .primary{display:none}
  .burger{display:block}
  #mobileMenu{display:none;padding:20px 0}
  
  /* Layout */
  .grid-sidebar{grid-template-columns:1fr}
  .products{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
  .hero h1{font-size:2.5rem}
  .footer-content{grid-template-columns:1fr;gap:32px}
  
  /* Account Dropdown */
  .dropdown-menu{width:280px;right:-16px}
  
  /* Product Details */
  .tab-header{overflow-x:auto;white-space:nowrap;padding-bottom:5px}
  .tab-btn{padding:12px 16px;font-size:0.9rem}
  .product-features ul{padding-left:10px}
  .product-actions{flex-direction:column;gap:12px}
  
  /* Reviews */
  .reviews-summary{grid-template-columns:1fr;gap:24px}
  .rating-overview{flex-direction:column;gap:24px}
  
  /* Footer */
  .footer-wave{display:none}
  .footer-newsletter{padding:24px 20px;margin-bottom:32px}
  
  /* Modal */
  .modal-panel{width:95%}
  .modal-content{padding:24px 16px}
}

/* Mobile Small */
@media (max-width:576px){
  html{font-size:14px}
  
  /* Layout */
  .card{padding:16px}
  .modal-content{padding:20px 12px}
  .hero{padding:32px 16px;margin-bottom:32px}
  .hero h1{font-size:2rem}
  
  /* Typography */
  h1{font-size:1.8rem}
  h2{font-size:1.5rem}
  h3{font-size:1.2rem}
  
  /* Product Details */
  .product-title{font-size:1.6rem}
  .product-price{font-size:2rem}
  .product-meta{flex-direction:column;align-items:flex-start;gap:12px}
  .tab-btn{padding:10px 14px;font-size:0.85rem}
  .spec-row{grid-template-columns:100%}
  .spec-label{border-right:none;border-bottom:1px solid var(--card-border);padding:12px 16px}
  .spec-value{padding:12px 16px}
  
  /* Touch Targets */
  .btn, button{min-height:44px;font-size:1rem}
  .nav-link{padding:12px 14px}
  .dropdown-item{padding:14px 16px}
  
  /* FAQ */
  .search-box input{padding:12px 40px}
  .accordion-header{padding:16px;font-size:0.95rem}
  .category-list a{padding:12px}
  
  /* Settings Modal */
  .settings-tab-btn{padding:10px 8px;font-size:0.9rem}
  
  /* Footer */
  .footer-newsletter h3{font-size:1.4rem}
}

/* Touch Device Optimizations */
@media (hover: none) {
  .btn:active, .nav-link:active, .footer-link:active, 
  .dropdown-item:active, .product:active {
    transform:scale(0.98);
  }
  
  input, select, textarea{font-size:16px !important} /* Prevent iOS zoom */
  
  .tap-area{min-height:44px;min-width:44px} /* Touch targets */
}

/* Login Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-modal.open {
  opacity: 1;
  visibility: visible;
}

.auth-panel {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  animation: slideUpFade 0.5s ease;
  border: 1px solid var(--card-border);
}

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

.auth-header {
  padding: 24px;
  text-align: center;
  position: relative;
}

.auth-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg);
}

.auth-title {
  margin: 0;
  font-size: 1.8rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.auth-subtitle {
  margin-top: 8px;
  color: var(--text-secondary);
}

.auth-toggle {
  display: flex;
  padding: 4px;
  background: rgba(0,0,0,0.2);
  border-radius: 999px;
  margin: 0 auto 24px;
  width: fit-content;
  position: relative;
}

.auth-toggle-btn {
  padding: 10px 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1;
}

.auth-toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--accent-gradient);
  border-radius: 999px;
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.auth-toggle.register .auth-toggle-slider {
  transform: translateX(100%);
}

.auth-toggle-btn.active {
  color: white;
}

.auth-forms {
  position: relative;
  height: 350px;
  overflow: hidden;
}

.auth-form {
  position: absolute;
  inset: 0;
  padding: 0 24px 24px;
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.auth-form.login {
  transform: translateX(0);
}

.auth-form.register {
  transform: translateX(100%);
}

.auth-toggle.register ~ .auth-forms .auth-form.login {
  transform: translateX(-100%);
}

.auth-toggle.register ~ .auth-forms .auth-form.register {
  transform: translateX(0);
}

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

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.2);
  outline: none;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input {
  margin-right: 8px;
}

.form-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.form-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 4px;
}

.auth-footer {
  padding: 16px 24px;
  text-align: center;
  border-top: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.social-auth {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-auth-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.social-auth-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent-primary);
}

.social-auth-btn .icon {
  font-size: 1.2rem;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.divider:before, .divider:after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.divider span {
  padding: 0 12px;
}
