:root {
  --primary: #274c77;
  --primary-dark: #6096ba;
  --primary-light: #a3cef1;
  --secondary: #10b981;
  --dark: #1e293b;
  --darker: #0f172a;
  --light: #f8fafc;
  --gray: #94a3b8;
  --gray-light: #e2e8f0;
  --gray-dark: #475569;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
    background: url('/theme/image/background.svg') no-repeat center center fixed;
  background-color: #f0f3fb;
  background-size: cover;
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 70px;
  font-size: 16px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px;
}

/* Header */
.header-picker {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  margin: 15px;
  position: relative;
  overflow: hidden;
}

.header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--darker);
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--dark);
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

/* Main layout */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Card styles */
.card {
  background:transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

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

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--darker);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-body {
  padding: 1.5rem;
}

/* Upload section */
.upload-area {
  border: 2px dashed var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-area:hover {
  border-color: var(--primary-light);
  background-color: rgba(99, 102, 241, 0.03);
}

.upload-area.active {
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.05);
}

.upload-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.upload-text {
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.upload-subtext {
  font-size: 0.9rem;
  color: var(--gray-dark);
}

#imagePreview {
  max-width: 100%;
  max-height: 500px;
  display: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.file-input-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: var(--shadow);
  min-height: 44px;
}

.file-input-label:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#fileInput {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Color display */
.color-display {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.color-swatch {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-light);
  flex-shrink: 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.color-swatch::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>');
}

.color-info {
  flex-grow: 1;
}

.color-hex {
  font-family: 'Fira Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-copy {
  background: none;
  border: none;
  color: var(--gray-dark);
  cursor: pointer;
  transition: var(--transition);
  padding: 0.25rem;
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
}

.color-copy:hover {
  color: var(--primary-dark);
  background: rgba(99, 102, 241, 0.1);
}

.color-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.color-value {
  background: var(--gray-light);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.color-value-label {
  font-weight: 500;
  color: var(--gray-dark);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.color-value-code {
  font-family: 'Fira Mono', monospace;
  font-size: 0.9rem;
}

/* Color history */
.color-history {
  margin-top: 1.5rem;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.history-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.history-item {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--gray-light);
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.history-item:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.history-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" fill-opacity=".05"><rect x="4" width="4" height="4"/><rect y="4" width="4" height="4"/></svg>');
}

/* Contrast section */
.contrast-section {
  background: var(--gray-light);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1.5rem;
}

.contrast-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.contrast-tests {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.contrast-test {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.contrast-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.contrast-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contrast-ratio {
  font-weight: 700;
  font-size: 1.1rem;
}

.contrast-rating {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.rating-aaa {
  background-color: var(--success);
}

.rating-aa {
  background-color: var(--secondary);
}

.rating-fail {
  background-color: var(--error);
}

/* Palette section */
.palette-section {
  margin-top: 1.5rem;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.palette-color {
  height: 60px;
  border-radius: var(--radius-sm);
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.palette-color:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.palette-color::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" fill-opacity=".05"><rect x="4" width="4" height="4"/><rect y="4" width="4" height="4"/></svg>');
}

.palette-tooltip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--darker);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  white-space: nowrap;
  z-index: 10;
}

.palette-color:hover .palette-tooltip {
  opacity: 1;
  bottom: -35px;
}

/* Gradient section */
.gradient-section {
  margin-top: 1.5rem;
}

.gradient-preview {
  height: 100px;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.gradient-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gradient-direction {
  flex-grow: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  background: white;
  font-family: inherit;
  font-size: 0.9rem;
  min-height: 44px;
}

.gradient-code {
  background: var(--gray-light);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: 'Fira Mono', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}

/* Tooltip */
.tooltip {
  position: absolute;
  background: var(--darker);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--darker) transparent transparent transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.9rem;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
}

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

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

.btn-uploadss {
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #6096ba;
  color: #274c77;
}

.btn-outline:hover {
  background-color: #a3cef1;
  border-color: #a3cef1;
}

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

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-dark);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.tab:hover:not(.active) {
  color: var(--dark);
  border-bottom-color: var(--gray);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

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

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

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

.pulse {
  animation: pulse 2s infinite;
}

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

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

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

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

/* How It Works */
.how-it-works {
  padding: 3rem 0;
  background-color: transparent;
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 3rem;
}

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

.step-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
}

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

.step-number {
  position: absolute;
  top: -20px;
  left: 20px;
  background: var(--primary);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.step-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-dark);
  padding-left: 10px;
}

.step-card p {
  color: var(--gray-dark);
}

/* Features */
.features {
  padding: 3rem 0;
}

.features h2 {
  text-align: center;
  margin-bottom: 3rem;
}

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

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}

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

.feature-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--darker);
}

.feature-card p {
  color: var(--gray-dark);
}

/* Use Cases */
.use-cases {
  padding: 3rem 0;
  background-color: transparent;
}

.use-cases h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.case-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.case-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}

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

.case-card h3 {
  margin-bottom: 1rem;
  color: var(--darker);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.case-card h3 i {
  color: var(--primary);
}

.case-card p {
  color: var(--gray-dark);
}

/* Comparison */
.comparison {
  padding: 3rem 0;
}

.comparison h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.comparison-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 600px;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

th {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: #f8fafc;
}

.fa-check {
  color: var(--success);
}

.fa-times {
  color: var(--error);
}

/* FAQ */
.faq {
  padding: 3rem 0;
  background-color: transparent;
}

.faq h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
}

.faq-card {
  background: white;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-card h3 {
  padding: 1.5rem;
  margin: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--darker);
  transition: var(--transition);
  min-height: 44px;
}

.faq-card h3:hover {
  color: var(--primary);
}

.faq-card h3 i {
  transition: transform 0.3s ease;
}

.faq-card.active h3 i {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-card.active .faq-content {
  padding: 0 1.5rem 1.5rem;
  max-height: 500px;
}

.faq-content p {
  color: var(--gray-dark);
}

/* Testimonials */
.testimonials {
  padding: 3rem 0;
}

.testimonials h2 {
  text-align: center;
  margin-bottom: 3rem;
}

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

.testimonial-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rating {
  color: var(--warning);
  margin-bottom: 1rem;
}

.testimonial-card p {
  font-style: italic;
  color: var(--gray-dark);
  margin-bottom: 1.5rem;
}

.author {
  display: flex;
  flex-direction: column;
}

.author strong {
  color: var(--darker);
}

.author span {
  color: var(--gray);
  font-size: 0.9rem;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin-top: 3rem;
}

.cta h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.cta p {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: white;
  color: var(--primary-dark);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow);
  min-height: 44px;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* AdSense containers */
.ad-container {
  margin: 1.5rem auto;
  padding: 1rem;
  min-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.03);
  border-radius: 8px;
  border: 1px dashed var(--gray);
}

.ad-top {
  margin-bottom: 2rem;
}

.ad-middle {
  margin: 2rem 0;
}

.ad-bottom {
  margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  
  .palette-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 60px;
    background-attachment: scroll;
  }
  
  .header-picker {
    margin: 0;
    border-radius: 0;
    padding: 1.5rem 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero .subtitle {
    font-size: 1.1rem;
  }
  
  .palette-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .color-display {
    flex-direction: column;
  }
  
  .color-swatch {
    width: 100%;
    height: 120px;
  }
  
  .color-values {
    grid-template-columns: 1fr;
  }
  
  .contrast-tests {
    grid-template-columns: 1fr;
  }
  
  .cta h2 {
    font-size: 1.8rem;
  }
  
  .step-card, .feature-card, .case-card, .testimonial-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 55px;
    font-size: 15px;
  }
  
  h1 {
    font-size: 1.7rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  .hero {
    padding: 3rem 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .upload-area {
    padding: 1.5rem;
    min-height: 200px;
  }
  
  .palette-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
 .btn-group {
    gap: 0.5rem;
  }
  
  .btn {
    min-width: auto;
    padding: 0.75rem 1rem;
  }
  
  .cta {
    padding: 3rem 1rem;
  }
  
  .cta h2 {
    font-size: 1.5rem;
  }
  
  .cta p {
    font-size: 1rem;
  }
  
  .steps, .feature-grid, .case-cards, .testimonial-grid {
    grid-template-columns: 1fr;
  }
}