/* 100X Solutions Brand System */
:root {
  --bg-primary: #0F172A;
  --surface-dark: #111827;
  --text-primary: #FFFFFF;
  --accent-cyan: #22D3EE;
  --accent-blue: #38BDF8;
  --success-green: #22C55E;
  --muted: #9CA3AF;
  --border: #374151;
  --shadow: rgba(0, 0, 0, 0.3);
  --gradient-primary: linear-gradient(135deg, #22D3EE, #38BDF8);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
.header {
  background-color: var(--surface-dark);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

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

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.3));
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-cyan);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--surface-dark) 100%);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 32px;
}

.use-cases {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.use-case-badge {
  background: var(--surface-dark);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.use-case-badge:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.privacy-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--success-green);
  font-size: 14px;
  font-weight: 500;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--text-primary);
}

.btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-green), #16A34A);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

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

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
}

.btn-icon {
  padding: 12px;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  min-height: 56px;
}

/* Upload Section */
.app-section {
  padding: 60px 0;
}

.upload-section {
  margin-bottom: 40px;
}

.upload-zone {
  background: var(--surface-dark);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 80px 40px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.05);
  transform: translateY(-2px);
}

.upload-content {
  max-width: 400px;
  margin: 0 auto;
}

.upload-icon {
  margin-bottom: 24px;
  color: var(--accent-cyan);
  opacity: 0.8;
}

.upload-zone h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.upload-zone p {
  color: var(--muted);
  margin-bottom: 24px;
}

.upload-info {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

.upload-btn {
  margin-bottom: 16px;
}

.error-message {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  display: none;
}

.error-message.show {
  display: block;
  animation: slideDown 0.3s ease;
}

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

/* Editor Section */
.editor-section {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  gap: 32px;
  align-items: start;
}

.editor-section.hidden {
  display: none;
}

/* Shape Selector */
.shape-selector {
  background: var(--surface-dark);
  border-radius: 16px;
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) transparent;
}

.shape-selector::-webkit-scrollbar {
  width: 6px;
}

.shape-selector::-webkit-scrollbar-track {
  background: transparent;
}

.shape-selector::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 3px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.shape-category {
  margin-bottom: 24px;
}

.category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shape-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.preset-grid {
  grid-template-columns: 1fr;
}

.shape-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.shape-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-1px);
}

.shape-card.active {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}

.shape-icon {
  width: 32px;
  height: 32px;
  border: 2px solid var(--accent-cyan);
  background: var(--text-primary);
  position: relative;
}

.preset-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.shape-card span {
  font-size: 12px;
  font-weight: 600;
}

.shape-card small {
  font-size: 10px;
  color: var(--muted);
}

/* Shape Icons */
.shape-square {
  border-radius: 4px;
}

.shape-rect-4-3 {
  width: 40px;
  height: 30px;
  border-radius: 4px;
}

.shape-rect-16-9 {
  width: 40px;
  height: 22px;
  border-radius: 4px;
}

.shape-circle {
  border-radius: 50%;
}

.shape-oval {
  width: 36px;
  height: 24px;
  border-radius: 50%;
}

.shape-rounded-square {
  border-radius: 8px;
}

.shape-heart {
  position: relative;
}

.shape-heart::before {
  content: '♥';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-cyan);
  font-size: 20px;
}

.shape-star {
  position: relative;
}

.shape-star::before {
  content: '★';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-cyan);
  font-size: 18px;
}

.shape-hexagon {
  position: relative;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: var(--accent-cyan);
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid var(--accent-cyan);
  background: transparent;
  border: none;
}

/* Canvas Editor */
.canvas-editor {
  background: var(--surface-dark);
  border-radius: 16px;
  padding: 24px;
}

.canvas-container {
  position: relative;
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#previewCanvas {
  max-width: 100%;
  max-height: 600px;
  cursor: grab;
}

#previewCanvas:active {
  cursor: grabbing;
}

.crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.crop-area {
  position: absolute;
  border: 2px solid var(--accent-cyan);
  background: transparent;
  pointer-events: all;
  cursor: move;
}

.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent-cyan);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
}

.resize-handle.nw {
  top: -6px;
  left: -6px;
  cursor: nw-resize;
}

.resize-handle.ne {
  top: -6px;
  right: -6px;
  cursor: ne-resize;
}

.resize-handle.sw {
  bottom: -6px;
  left: -6px;
  cursor: sw-resize;
}

.resize-handle.se {
  bottom: -6px;
  right: -6px;
  cursor: se-resize;
}

/* Image Controls */
.image-controls {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 20px;
}

.control-group {
  margin-bottom: 16px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#zoomValue {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

/* Download Panel */
.download-panel {
  background: var(--surface-dark);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 100px;
}

.download-options {
  margin-bottom: 24px;
}

.option-group {
  margin-bottom: 16px;
}

.option-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.format-selector {
  display: flex;
  gap: 4px;
  background: var(--bg-primary);
  padding: 4px;
  border-radius: 8px;
}

.format-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-btn.active {
  background: var(--accent-cyan);
  color: var(--bg-primary);
}

.quality-group {
  display: none;
}

.quality-group.show {
  display: block;
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.download-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--success-green);
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
}

.download-success.hidden {
  display: none;
}

/* Features Section */
.features-section {
  padding: 80px 0;
  background: var(--surface-dark);
}

.section-heading {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.6;
}

/* FAQ Section */
.faq-section {
  padding: 80px 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.faq-item {
  background: var(--surface-dark);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.faq-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-cyan);
}

.faq-item p {
  color: var(--muted);
  line-height: 1.6;
}

/* Footer */
.footer {
  background: var(--surface-dark);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-copy {
  color: var(--muted);
  margin-bottom: 16px;
}

.footer-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--surface-dark);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  border: 1px solid var(--border);
  text-align: center;
}

.modal-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-content p {
  color: var(--muted);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .editor-section {
    grid-template-columns: 250px 1fr;
    gap: 24px;
  }
  
  .download-panel {
    position: static;
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .header .container {
    padding: 12px 16px;
  }
  
  .nav {
    display: none;
  }
  
  .hero {
    padding: 60px 0 40px;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .use-cases {
    gap: 8px;
  }
  
  .use-case-badge {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .editor-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .shape-selector {
    max-height: none;
    overflow: visible;
  }
  
  .shape-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .canvas-container {
    min-height: 300px;
  }
  
  .control-buttons {
    justify-content: center;
  }
  
  .download-actions {
    flex-direction: row;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .upload-zone {
    padding: 40px 20px;
  }
  
  .upload-zone h3 {
    font-size: 20px;
  }
  
  .shape-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .canvas-editor {
    padding: 16px;
  }
  
  .download-panel {
    padding: 16px;
  }
  
  .feature-card,
  .faq-item {
    padding: 20px 16px;
  }
}

/* Print Styles */
@media print {
  .header,
  .nav,
  .hero,
  .features-section,
  .faq-section,
  .footer {
    display: none;
  }
  
  .app-section {
    padding: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}

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

/* Focus styles */
button:focus,
input:focus,
.slider:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: #FFFFFF;
    --muted: #CCCCCC;
  }
  
  .shape-card {
    border-width: 2px;
  }
  
  .btn-secondary {
    border-width: 2px;
  }
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s infinite;
}

