:root {
  --primary-color: #7b7de1;
  --secondary-color: #8976b4;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --neutral-100: #f8fafc; 
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-600: #475569;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
}

* {
  box-sizing: border-box;
}
a{text-decoration: none;}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, var(--neutral-100) 0%, #e2e8f0 100%);
}
.logo{font-family: 'Playfair Display', serif;letter-spacing: 0.05em;background-color: transparent;font-size:1.5rem;}

.main-container {
  background: white;
  /* border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* margin: 20px; */
  min-height: calc(100vh - 40px);
  max-width:100%;
  overflow: hidden;
}

/* Header Styles */
.header {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  height: 72px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-pills {
  background: var(--neutral-100);
  border-radius: 12px;
  padding: 4px;
  display: flex;
  gap: 4px;
}

.nav-pills .nav-link {
  border-radius: 8px;
  color: var(--neutral-600);
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  transition: all 0.2s ease;
}

.nav-pills .nav-link.active {
  background: var(--primary-color);
  color: white;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.credits-badge {
  background: linear-gradient(135deg, var(--accent-color), #f59e0b);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;color:white;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 72px;
  width: 60px;
  background: var(--neutral-100);
  height: calc(100vh - 72px);
  padding: 16px 8px;
  border-right: 1px solid var(--neutral-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 999;
}


.sidebar-section {
  margin-bottom: 24px;
  width: 100%;
}

.sidebar-title {
  display: none;
}

.tool-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tool-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.tool-card.active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.tool-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 16px;
}

.tool-card.active .tool-icon {
  color: var(--primary-color);
}

.tool-title {
  display: none;
}

.tool-description {
  display: none;
}

/* Tooltip for sidebar icons */
.tool-card::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--neutral-800);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.tool-card:hover::after {
  opacity: 1;
}

/* Main Workspace */
.workspace {
  margin-left: 60px;
  margin-top: 72px;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: calc(100% - 60px);
}

.workspace-header {
  padding: 24px;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.workspace-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--neutral-800);
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-outline-custom {
  border: 2px solid var(--neutral-300);
  color: var(--neutral-600);
  border-radius: 12px;
  padding: 10px 24px;
  font-weight: 600;
  background: white;
  transition: all 0.2s ease;
}

.btn-outline-custom:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Canvas Area */
.canvas-area {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}



/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast-custom {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--neutral-200);
  min-width: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-container {
      margin: 0;
      border-radius: 0;
      min-height: 100vh;
  }
  .header {
      padding: 12px 16px;
  }
  .sidebar {
      display: none !important;
  }

  .workspace {
      margin-left: 0;
      width: 100%;
      margin-top: 72px;
  }


  .nav-pills {
      display: none;
  }
}
@media (max-width: 1024px) {
  .workspace {
      margin-left: 0;
      width: 100%;
  }
  
  .sidebar {
      display: none;
  }
}

@media (min-width: 1025px) {
  .sidebar {
      display: flex !important;
  }
}
/* API Configuration Hidden Inputs */
.api-config {
  display: none;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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


/***/
.card {
border-radius: 20px;
box-shadow: var(--card-shadow);
transition: all 0.3s ease;
overflow: hidden;
}

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

.upload-area {
border: 3px dashed #dee2e6;
border-radius: 15px;
padding: 3rem 2rem;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.upload-area:hover, .upload-area.dragover {
border-color: #667eea;
background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
transform: scale(1.02);
}

.upload-icon {
font-size: 3rem;
color: #667eea;
margin-bottom: 1rem;
}

.image-preview {
min-height: 200px;
border: 2px dashed #dee2e6;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-top: 1rem;
background: #f8f9fa;
transition: all 0.3s ease;
overflow-y: auto;
}

.image-preview img {
max-height: 300px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-gradient {
background: var(--primary-gradient);
border: none;
color: white;
padding: 0.75rem 2rem;
border-radius: 25px;
font-weight: 600;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.btn-gradient:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
color: white;
}

.btn-success-gradient {
background: var(--success-gradient);
border: none;
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: 600;
transition: all 0.3s ease;
}

.btn-success-gradient:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(17, 153, 142, 0.4);
color: white;
}

.processing-section {
text-align: center;
padding: 3rem;
background: white;
border-radius: 20px;
box-shadow: var(--card-shadow);
}

.spinner-custom {
width: 60px;
height: 60px;
border: 6px solid #f3f3f3;
border-top: 6px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 2rem;
}

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

.result-item {
background: white;
border-radius: 15px;
padding: 1.5rem;
box-shadow: var(--card-shadow);
transition: all 0.3s ease;
text-align: center;
}

.result-item:hover {
transform: translateY(-5px);
box-shadow: var(--hover-shadow);
}

.result-item img {
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.examples-section {
background: white;
border-radius: 20px;
padding: 2rem;
box-shadow: var(--card-shadow);
}

.examples-section h3 {
color: #495057;
margin-bottom: 1.5rem;
font-weight: 600;
}

.example-tag {
display: inline-block;
background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
color: #1976d2;
padding: 0.5rem 1rem;
border-radius: 20px;
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.9rem;
font-weight: 500;
}

.example-tag:hover {
background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(25, 118, 210, 0.3);
}

.fade-in {
opacity: 0;
transform: translateY(30px);
transition: all 0.6s ease;
}

.fade-in.show {
opacity: 1;
transform: translateY(0);
}

.api-config {
background: #f8f9fa;
border-radius: 15px;
padding: 1.5rem;
margin-bottom: 2rem;
}

.api-select {
border-radius: 10px;
border: 2px solid #dee2e6;
padding: 0.5rem 1rem;
transition: all 0.3s ease;
}

.api-select:focus {
border-color: #667eea;
box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.progress-bar {
background: var(--primary-gradient);
border-radius: 10px;
height: 8px;
transition: width 0.3s ease;
}

.comparison-view {
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
margin: 2rem 0;
}

.comparison-item {
text-align: center;
flex: 1;
}

.comparison-arrow {
font-size: 2rem;
color: #667eea;
animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
.header-section h1 {
  font-size: 2rem;
}

.comparison-view {
  flex-direction: column;
}

.comparison-arrow {
  transform: rotate(90deg);
}
}    