/* Power-Grotesk Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Custom CSS Variables */
:root {
  --primary-orange: #FE5000;
  --primary-orange-hover: #e6470a;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --background-light: #f9fafb;
  --border-color: #d1d5db;
  --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-light);
}

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

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.875rem;
}

h3 {
  font-size: 1.5rem;
}

/* Form Styling */
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
  background-color: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(254, 80, 0, 0.1);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-orange-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

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

.btn-secondary:hover {
  background-color: #374151;
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

/* Card Styles */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-light);
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transition: box-shadow 0.2s ease-in-out;
}

/* QR Code Container */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-light);
}

.qr-placeholder {
  width: 256px;
  height: 256px;
  border: 2px dashed var(--border-color);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: #f9fafb;
}

/* JSON Preview */
.json-preview {
  background-color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 120px;
  border: 1px solid var(--border-color);
}

/* Share URL Section */
.share-url-container {
  display: flex;
  margin-top: 1rem;
}

.share-url-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 0.5rem 0 0 0.5rem;
  background-color: #f9fafb;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.share-url-btn {
  padding: 0.75rem 1rem;
  background-color: var(--primary-orange);
  color: white;
  border: none;
  border-radius: 0 0.5rem 0.5rem 0;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease-in-out;
}

.share-url-btn:hover {
  background-color: var(--primary-orange-hover);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 1rem;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .qr-container {
    padding: 1rem;
  }
  
  .qr-placeholder {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .qr-placeholder {
    width: 180px;
    height: 180px;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

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

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.visible {
  display: block !important;
}

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

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

/* QR Code Specific Styling */
.qr-code-wrapper {
  position: relative;
  display: inline-block;
  padding: 20px;
  background-color: white;
  border-radius: 12px;
  border: 3px solid var(--primary-orange);
  box-shadow: var(--shadow-medium);
}

.qr-code-wrapper::after {
  content: "r1 creations";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  background-color: white;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Loading State */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(254, 80, 0, 0.1), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}