/* KiwiChart Deals - Modern Design System - English Version */

:root {
  --primary-navy: #1e3a8a;
  --secondary-navy: #1e40af;
  --accent-blue: #3b82f6;
  --light-blue: #dbeafe;
  --white: #ffffff;
  --light-gray: #f8fafc;
  --gray: #64748b;
  --dark-gray: #334155;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --border-radius: 12px;
  --shadow-sm: 0 2px 8px rgba(30, 58, 138, 0.1);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(30, 58, 138, 0.15);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--light-gray);
  color: var(--dark-gray);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.main-header {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(30, 58, 138, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--primary-navy);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: var(--dark-gray);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: var(--light-blue);
  color: var(--primary-navy);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary-navy);
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-btn.active {
  color: var(--secondary-navy);
}



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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray);
}

/* Links */
a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-navy);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  justify-content: center;
}

.btn-primary {
  background: var(--primary-navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--secondary-navy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--light-blue);
  color: var(--primary-navy);
  border: 2px solid var(--primary-navy);
}

.btn-secondary:hover {
  background: var(--primary-navy);
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-error {
  background: var(--error);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-gray);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-header {
  padding: 24px;
  border-bottom: 1px solid var(--light-gray);
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 24px;
  border-top: 1px solid var(--light-gray);
  background: var(--light-gray);
}

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

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-gray);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
  background: var(--white);
  color: var(--dark-gray);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
  color: var(--gray);
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-navy);
  color: var(--white);
}

.badge-success {
  background: var(--success);
  color: var(--white);
}

.badge-warning {
  background: var(--warning);
  color: var(--white);
}

.badge-error {
  background: var(--error);
  color: var(--white);
}

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

.text-primary { color: var(--primary-navy); }
.text-secondary { color: var(--gray); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.bg-primary { background: var(--primary-navy); }
.bg-secondary { background: var(--light-gray); }
.bg-white { background: var(--white); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.rounded-full { border-radius: 50%; }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Grid System */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.col {
  flex: 1;
  padding: 0 12px;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-5 { flex: 0 0 41.666667%; }
.col-6 { flex: 0 0 50%; }
.col-7 { flex: 0 0 58.333333%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-10 { flex: 0 0 83.333333%; }
.col-11 { flex: 0 0 91.666667%; }
.col-12 { flex: 0 0 100%; }

/* Responsive Grid */
@media (max-width: 768px) {
  .col-md-1 { flex: 0 0 8.333333%; }
  .col-md-2 { flex: 0 0 16.666667%; }
  .col-md-3 { flex: 0 0 25%; }
  .col-md-4 { flex: 0 0 33.333333%; }
  .col-md-5 { flex: 0 0 41.666667%; }
  .col-md-6 { flex: 0 0 50%; }
  .col-md-7 { flex: 0 0 58.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; }
  .col-md-9 { flex: 0 0 75%; }
  .col-md-10 { flex: 0 0 83.333333%; }
  .col-md-11 { flex: 0 0 91.666667%; }
  .col-md-12 { flex: 0 0 100%; }
}

@media (max-width: 576px) {
  .col-sm-1 { flex: 0 0 8.333333%; }
  .col-sm-2 { flex: 0 0 16.666667%; }
  .col-sm-3 { flex: 0 0 25%; }
  .col-sm-4 { flex: 0 0 33.333333%; }
  .col-sm-5 { flex: 0 0 41.666667%; }
  .col-sm-6 { flex: 0 0 50%; }
  .col-sm-7 { flex: 0 0 58.333333%; }
  .col-sm-8 { flex: 0 0 66.666667%; }
  .col-sm-9 { flex: 0 0 75%; }
  .col-sm-10 { flex: 0 0 83.333333%; }
  .col-sm-11 { flex: 0 0 91.666667%; }
  .col-sm-12 { flex: 0 0 100%; }
}

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

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
  animation: slideIn 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Loading States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--primary-navy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.empty-icon {
  font-size: 64px;
  color: var(--light-gray);
  margin-bottom: 20px;
}

.empty-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--dark-gray);
}

.empty-desc {
  font-size: 16px;
  max-width: 400px;
  margin: 0 auto;
}

/* Loading States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--primary-navy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast Messages */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--error);
}

.toast-info {
  background: var(--accent-blue);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 15px;
  }
  
  .card-header,
  .card-body,
  .card-footer {
    padding: 20px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  /* Mobile Menu */
  .nav-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.1);
    border-top: 1px solid var(--light-gray);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .nav-menu.show {
    display: flex;
  }



  .nav-link {
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
    width: 100%;
    text-align: center;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .container {
    padding: 0 10px;
  }
  
  .card-header,
  .card-body,
  .card-footer {
    padding: 16px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .empty-icon {
    font-size: 48px;
  }
  
  .empty-title {
    font-size: 20px;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* 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 {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-navy: #000080;
    --secondary-navy: #0000ff;
    --accent-blue: #0066cc;
    --gray: #333333;
    --dark-gray: #000000;
  }
}

/* Google Translate Widget */
#google_translate_element {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 999;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(30, 58, 138, 0.1);
  padding: 10px;
  border: 1px solid var(--light-gray);
}

#google_translate_element .goog-te-gadget {
  font-size: 14px;
  color: var(--primary-navy);
}

#google_translate_element .goog-te-combo {
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  padding: 5px 10px;
  background: var(--white);
  color: var(--primary-navy);
  font-size: 14px;
}

#google_translate_element .goog-te-banner-frame {
  display: none !important;
}

.goog-te-gadget .goog-te-combo {
  margin: 0;
}

/* Reduced Motion */
/* Footer Styles */
.main-footer {
  background: var(--primary-navy);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
