/* Default (Light Theme) */
:root {
    --primary-color: #2c6bed;
    --primary-dark: #1e4bb8;
    --primary-light: #4f8cff;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    --bg-color: #f8f9fa;
    --surface-color: #ffffff;
    --card-bg: #ffffff;
    --drop-bg: #edeeef;
    --text-color: #333333;
    --text-light: #333333;
    --navbar-border:#8a8a8a;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 2px 6px var(--shadow-color);
    --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);

    --navbar-text: #ffffff;

    --dropdown-bg: #ffffff;
    --dropdown-text: #222323;
    --dropdown-hover-bg: var(--primary-gradient);
    --dropdown-hover-text: #ffffff;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --accent-color: #8b5cf6;

    --transition: all 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #4f8cff;
    --primary-dark: #3268d4;
    --primary-light: #6fa3ff;
    --primary-gradient: linear-gradient(135deg, #4f8cff 0%, #764ba2 100%);

    --bg-color: #1a202c;
    --surface-color: #2d3748;
    --card-bg: #2d3748;
    --drop-bg: #2d3748;
    --text-color: #e2e8f0;
     --text-light: #919296;
    --navbar-border:#ffffff;

    --border-color: #4a5568;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow: 0 2px 8px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);

    --navbar-text: #e2e8f0;

    --dropdown-bg: #2d3748;
    --dropdown-text: #e2e8f0;
    --dropdown-hover-bg: var(--primary-gradient);
    --dropdown-hover-text: #ffffff;

    --gray-50: #1a202c;
    --gray-100: #2d3748;
    --gray-200: #4a5568;
    --gray-300: #718096;
    --gray-400: #a0aec0;
    --gray-500: #cbd5e0;
    --gray-600: #e2e8f0;
    --gray-700: #edf2f7;
    --gray-800: #f7fafc;

    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --accent-color: #9f7aea;

    --transition: all 0.3s ease;
}

/* ===============================
   GLOBAL STYLES
   =============================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: "Roboto", sans-serif;
    font-style: normal;
    /* line-height: 1.6; */
    font-weight: 500;
    color: var(--text-color);
    background-color: var(--bg-color);
    user-select: none;
}

/* Main Content Styles */
main {
    margin-top: 40px;
    padding: 3rem 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero-section,
.hero-section h1 {
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    text-align: center;
}
.hero-section p{
     color: var(--text-light);
    background-color: var(--bg-color);
    transition: var(--transition);
    text-align: center;
}
h1{
    font-size: 1.4rem;
}
p{
     font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}


/* Compressor Section */
.compressor-section {
    max-width: 750px;
    margin: 20px auto;
    padding: 0 10px;
}

.drop-container{
    border-radius: 25px;
    padding: 20px 20px;
    text-align: center;
    background-color: var(--drop-bg);
}

.drop-zone {
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    background-color:var(--gray-50);
    margin-bottom: 12px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    background-color: rgba(44, 107, 237, 0.1);
    border-color: var(--primary-dark);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

.browse-link {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.supported-formats {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

#file-upload {
    display: none;
}

.file-info {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(44, 107, 237, 0.1);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Compression Controls */
.compression-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#target-size,
#unit-select,
#compress-button {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--surface-color);
    color: var(--text-color);
}

#target-size {
    width: 150px;
}

#compress-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

#compress-button:hover {
    background-color: var(--primary-dark);
}

/* Processing Info */
.processing-info {
    background-color: rgba(44, 107, 237, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

/* Quick Compress Links */
.quick-compress-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin: 30px 0;
    font-size: 0.9rem;
}

.quick-link {
    background-color: rgba(44, 107, 237, 0.05);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.quick-link:hover {
    background-color: rgba(44, 107, 237, 0.1);
    border-color: var(--primary-color);
}

/* Output Area */
.output-area {
    max-width: 1000px;
    padding: 15px;
    background-color: var(--surface-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: none;
}

.output-area h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    text-align: center;
}

/* Comparison Slider */
.comparison-container {
    position: relative;
    height: auto;
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.before-container,
.after-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.before-container img,
.after-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
}

.after-container {
    width: 50%;
    border-right: 2px solid var(--primary-color);
}

.label {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    background-color: rgba(44, 107, 237, 0.8);
    color: white;
    font-weight: 600;
    border-radius: 4px;
}

.before-container .label {
    left: 10px;
}

.after-container .label {
    right: 10px;
}

.slider {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    z-index: 2;
    cursor: col-resize;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 6px;
    height: 100%;
    background: var(--primary-color);
    cursor: col-resize;
}

.slider::-moz-range-thumb {
    width: 6px;
    height: 100%;
    background: var(--primary-color);
    cursor: col-resize;
    border: none;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.slider-handle::before {
    content: "↔";
}

/* Compression Stats */
.compression-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0 0 0;
    background-color: rgba(44, 107, 237, 0.05);
    border-radius: 8px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.download-btn {
    display: block;
    margin: 20px auto 0;
    background-color:  #4CAF50;
    color: white;
    border: none;
    padding: 6px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    font-size: 0.8rem;
}

.download-btn:hover {
       background-color: #45a049;
}

#convert-another-btn {
    padding:15px 20px;
    border:1px solid var(--primary-color);
    background: var(--bg-color);
    color:var(--text-color);
    border-radius:6px;
    cursor:pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#convert-another-btn:hover{
   background: var(--primary-color);
   color: #ffffff;
}
/* Progress Area */
.progress-area {
    margin: 30px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Error Area */
.error-area {
    margin: 20px 0;
    padding: 15px;
    background-color: #ffeaea;
    border-left: 4px solid #e74c3c;
    border-radius: 0 5px 5px 0;
    color: #c0392b;
}

.error-message {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.error-message:last-child {
    margin-bottom: 0;
}

.error-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* App Links */
.app-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.app-link img {
    height: 50px;
    border-radius: 8px;
}

/* Content Sections */
.about-section,
.how-to-section,
.faq-section {
    max-width: 1100px;
    margin: 0;
    padding: 0;
    margin: auto;
}

.about-section h2,
.how-to-section h2,
.faq-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-align: center;
}

.about-section p,
.how-to-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    text-align: left;
}

.step {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.step h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

 /* faq section */
.faq-section {
  max-width: 1000px;
  margin: auto auto;
  padding: 0 20px;
  margin-bottom: 30px;
  
}

.faq-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.faq-item {
  background-color: var(--surface-color);
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 25px;
  font-size: 1.1rem;
  font-weight: 500;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  position: relative;
  color: var(--text-color);
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 25px;
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* large enough to fit content */
  padding: 15px 25px 20px;
}

/* Responsive */
@media (max-width: 600px) {
    main{
        padding:3rem 0.5rem;
    }
.drop-zone {
    padding: 20px 20px;
    margin-bottom: 10px;
}
  .faq-section h2 {
    font-size: 1.8rem;
  }
  .faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }
  .faq-question::after {
    right: 20px;
  }
  .faq-answer {
    padding: 0 20px;
    font-size: 0.95rem;
  }
  .faq-item.active .faq-answer {
    padding: 10px 20px 15px;
  }
}
/* feature section */
    .features-section {
  background-color: var(--bg-color);
  color: var(--text-color);
 padding: 1.8rem 1rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.features-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-color);
}

.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px 20px;
  box-shadow: var(--shadow);
  transition: none; /* No hover animation */
}

.feature-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Footer Styles */
footer {
     background-color: var(--bg-color);
    border-top: 1px solid var(--navbar-border);
    box-shadow: 0 2px 20px var(--shadow-color);
    color:var(--text-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 1rem;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-links {
    display: flex;
    gap: 7rem;
    flex-wrap: wrap;
}

.footer-column h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    text-decoration: underline;
}

.footer-bottom  p{
    text-align: center;
    background-color: var(--bg-color);
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.2rem;
    }

    .hero-section p {
        font-size: 0.8rem;
    }
    header h1{
        font-size: 1.3rem;
    }

    .about-section h2, .how-to-section h2, .faq-section h2,.features-title {
    font-size: 1.3rem;
    text-align: left;
    }

    .compression-controls {
        align-items: center;
    }

    #target-size {
        width: 100%;
        max-width: 200px;
    }

    .quick-compress-links {
        grid-template-columns: 1fr;
    }

    .comparison-slider {
        height: 200px;
    }

    .compression-stats {
        flex-direction: column;
        gap: 10px;
        padding: 0;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 20px;
    }
    .about-section,
    .how-to-section,
    .faq-section {
    margin: 0 auto;
    padding: 0 20px;
}
  .feature-card {
    padding: 25px 15px;
  }
}