:root{
      --bg: #f6f7fb;
      --card: #ffffff;
      --muted: #667085;
      --text: #0b1223;
      --accent-1: #8b5cf6;
      --accent-2: #ff6b6b;
      --accent-grad: linear-gradient(90deg,var(--accent-1),#ff6b6b);
      --shadow-1: 0 6px 24px rgba(16,24,40,0.08);
      --radius-lg: 14px;
      --radius-md: 10px;
      --radius-sm: 8px;
    }

    *{box-sizing:border-box;margin:0;padding:0}
    html,body{height:100%}
    body{
      font-family: 'Inter', -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial;
      background: linear-gradient(180deg, #fbfbfe 0%, var(--bg) 100%);
      color:var(--text);
      -webkit-font-smoothing:antialiased;
      -moz-osx-font-smoothing:grayscale;
      line-height:1.4;
      padding-bottom:48px;
    }

    /* Main layout */
    .main-wrapper {
      display: flex;
      min-height: 100vh;
      max-width: 1400px;
      margin: 0 auto;
      width: 100%;
      padding: 0 10px;
    }

    .ad-space-left, .ad-space-right {
      width: 20%;
      min-width: 160px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px 10px;
      position: sticky;
      top: 0;
      height: 100vh;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-1);
      border: 2px solid rgba(255,255,255,0.2);
      overflow: hidden;
    }

    .main-content {
      flex: 1;
      min-width: 0;
      width: 60%;
      padding: 0 15px;
      max-width: 100%;
    }

    /* Container */
    .container{
      max-width:100%;
      margin:0 auto;
      padding:20px 0;
      width: 100%;
    }

    /* Header */
    header{
      background: transparent;
      padding:15px 0;
      position:relative;
    }

    .topbar{
      display:flex;
      align-items:center;
      justify-content:space-between;
      flex-wrap: wrap;
      gap: 16px;
    }

    .brand{
      display:flex;
      gap:12px;
      align-items:center;
    }

    .brand-logo{
      width:40px;height:40px;border-radius:9px;
      background:var(--accent-grad);
      display:flex;align-items:center;justify-content:center;color:white;font-weight:800;
      box-shadow: 0 6px 18px rgba(139,92,246,0.18);
      font-size:14px;
    }

    .brand-title{
      font-weight:700;
      font-size:18px;
      letter-spacing: -0.2px;
    }

    /* Navigation Styles */
    nav.topnav{
      display:flex;
      gap:16px;
      align-items:center;
      flex-wrap: wrap;
    }
    
    nav.topnav a{
      color:var(--muted); 
      text-decoration:none; 
      font-size:14px; 
      font-weight:600;
      padding:8px 12px; 
      border-radius:8px;
      cursor: pointer;
      white-space: nowrap;
    }
    
    nav.topnav a:hover{
      color:var(--text); 
      background: rgba(99,102,241,0.06)
    }

    /* Mobile Navigation Toggle */
    .mobile-nav-toggle {
      display: none;
      background: transparent;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: var(--muted);
      padding: 5px 10px;
      border-radius: var(--radius-sm);
    }

    .mobile-nav-toggle:hover {
      background: rgba(99,102,241,0.06);
      color: var(--text);
    }

    /* Hero section */
    .hero{
      margin-top:12px;
      width: 100%;
    }

    .hero-left{
      padding:20px 0 0 0;
      width: 100%;
    }

    .kicker{
      display:inline-block;
      padding:6px 10px;
      border-radius:999px;
      background: linear-gradient(90deg, rgba(139,92,246,0.12), rgba(255,107,107,0.08));
      color: var(--accent-1);
      font-weight:700;
      font-size:13px;
      margin-bottom:18px;
    }

    h1{
      font-size:36px;
      margin-bottom:12px;
      font-weight:800;
      line-height:1.05;
      color:var(--text);
    }

    .sub{
      color:var(--muted);
      font-size:16px;
      max-width:100%;
      margin-bottom:40px;
      text-align: center;
    }

    /* Tool card - CENTERED */
    .tool-card{
      background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.96));
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-1);
      padding:30px;
      border: 1px solid rgba(16,24,40,0.04);
      width: 100%;
      max-width: 600px;
      margin: 0 auto 40px auto;
    }

    .uploader{
      border-radius:12px;
      padding:28px;
      background: linear-gradient(180deg, #ffffff, #fbfbff);
      border:1px dashed rgba(16,24,40,0.06);
      display:flex;
      flex-direction:column;
      gap:18px;
      align-items:center;
      justify-content:center;
      min-height:220px;
      transition: all .18s ease;
      width: 100%;
    }

    .uploader.active{
      border-color: rgba(139,92,246,0.9);
      box-shadow: 0 12px 30px rgba(139,92,246,0.06);
      transform: translateY(-2px);
      background: linear-gradient(180deg, rgba(139,92,246,0.02), rgba(255,107,107,0.01));
    }

    .uploader .icon{
      width:72px;height:72px;border-radius:14px;display:flex;align-items:center;justify-content:center;
      background: linear-gradient(180deg,#fff,#fff); box-shadow: 0 8px 22px rgba(16,24,40,0.06);
      font-size:34px;
      color:var(--accent-1);
    }

    .uploader .title{
      font-size:18px;font-weight:700;color:var(--text);
      text-align: center;
    }

    .uploader .desc{
      color:var(--muted); 
      font-size:14px; 
      text-align:center; 
      max-width:100%;
    }

    .file-input{ display:none; }

    .actions-row{
      display:flex; 
      gap:12px; 
      margin-top:8px; 
      width:100%;
      flex-wrap: wrap;
      justify-content: center;
    }

    .btn{
      -webkit-appearance:none; 
      appearance:none;
      display:inline-flex; 
      align-items:center; 
      justify-content:center;
      padding:10px 16px; 
      border-radius:999px; 
      font-weight:700; 
      font-size:15px;
      cursor:pointer; 
      border:none;
      box-shadow: 0 8px 20px rgba(16,24,40,0.06);
      transition: transform .14s ease, box-shadow .14s ease, opacity .12s;
      white-space: nowrap;
    }

    .btn:active{ transform: translateY(1px) }
    .btn:disabled{ opacity:.6; cursor:not-allowed; transform:none; box-shadow:none }

    .btn-primary{
      background: var(--accent-grad);
      color:white;
      padding:12px 18px;
    }

    .btn-secondary{
      background: transparent;
      border: 1px solid rgba(16,24,40,0.06);
      color:var(--text);
      padding:10px 14px;
    }

    .btn-ghost{
      background: transparent; 
      color: var(--muted); 
      border-radius:10px;
      padding:8px 12px; 
      font-weight:600;
    }

    /* Selected files */
    .selected-files{
      margin-top:18px;
      border-radius:10px;
      padding:12px;
      background: #fbfbff;
      border:1px solid rgba(16,24,40,0.03);
      width: 100%;
    }

    .file-list{ 
      list-style:none; 
      display:flex; 
      flex-direction:column; 
      gap:10px; 
      max-height:220px; 
      overflow:auto; 
      padding:6px; 
    }
    
    .file-item{
      display:flex; 
      align-items:center; 
      gap:12px; 
      padding:10px; 
      background: linear-gradient(180deg,#fff,#fafaff);
      border-radius:10px; 
      border:1px solid rgba(16,24,40,0.03);
    }
    
    .file-handle{ 
      cursor:grab; 
      color:var(--muted); 
      font-weight:800; 
      padding:0 6px 
    }
    
    .file-name{ 
      font-weight:600; 
      color:var(--text); 
      font-size:14px; 
      overflow:hidden; 
      text-overflow:ellipsis; 
      white-space:nowrap; 
      flex: 1;
    }

    /* Settings */
    .settings-panel{
      margin-top:16px; 
      background:transparent; 
      padding:0;
      width: 100%;
    }
    
    .setting-item{ 
      display:flex; 
      flex-direction:column; 
      gap:8px; 
    }
    
    .setting-label{ 
      display:flex; 
      justify-content:space-between; 
      align-items:center; 
    }
    
    .setting-name{ 
      font-weight:700; 
      color:var(--muted); 
      font-size:13px 
    }
    
    .setting-value{ 
      font-weight:800; 
      color:var(--accent-1) 
    }

    input[type=range].slider{
      -webkit-appearance:none; 
      height:6px; 
      border-radius:999px; 
      background: linear-gradient(90deg,#eef2ff,#fef2f2);
      outline:none; 
      width:100%;
    }
    
    input[type=range].slider::-webkit-slider-thumb{
      -webkit-appearance:none; 
      width:18px;
      height:18px;
      border-radius:50%;
      background: white; 
      border:6px solid var(--accent-1); 
      box-shadow:0 6px 14px rgba(139,92,246,0.18);
    }

    .quality-labels{ 
      display:flex; 
      justify-content:space-between; 
      color:var(--muted); 
      font-size:13px; 
      margin-top:6px 
    }

    /* Features */
    .features{
      margin-top:34px;
      padding:26px;
      background: transparent;
      border-radius:12px;
      width: 100%;
    }
    
    .features-grid{ 
      display:grid; 
      grid-template-columns:repeat(3,1fr); 
      gap:18px; 
      margin-top:8px 
    }
    
    .feature-card{
      background: linear-gradient(180deg,#fff,#fbfbff);
      padding:18px;
      border-radius:12px;
      border:1px solid rgba(16,24,40,0.03);
      display:flex;
      flex-direction:column;
      gap:8px;
      align-items:flex-start;
      box-shadow: 0 10px 26px rgba(16,24,40,0.03);
    }
    
    .feature-icon{ 
      font-size:22px; 
      background: rgba(139,92,246,0.06); 
      padding:8px; 
      border-radius:8px; 
      color:var(--accent-1) 
    }
    
    .feature-title{ 
      font-weight:700; 
      font-size:15px; 
      color:var(--text) 
    }
    
    .feature-description{ 
      color:var(--muted); 
      font-size:14px 
    }

    /* How to use section */
    .how-to-use {
      margin-top: 60px;
      padding: 40px 0;
      background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.96));
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-1);
      width: 100%;
    }
    
    .how-to-use h2 {
      text-align: center;
      font-size: 32px;
      margin-bottom: 40px;
      font-weight: 800;
      color: var(--text);
    }
    
    .steps-container {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 20px;
      padding: 0 20px;
    }
    
    .step-card {
      background: linear-gradient(180deg, #ffffff, #fbfbff);
      border-radius: var(--radius-md);
      padding: 24px;
      text-align: center;
      border: 1px solid rgba(16,24,40,0.03);
      box-shadow: 0 6px 16px rgba(16,24,40,0.03);
    }
    
    .step-number {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--accent-grad);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 16px;
      font-weight: 700;
      font-size: 16px;
    }
    
    .step-title {
      font-weight: 700;
      font-size: 18px;
      margin-bottom: 12px;
      color: var(--text);
    }
    
    .step-description {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
    }

    footer{
      margin-top:42px; 
      padding:24px 0; 
      text-align:center; 
      color:var(--muted);
      width: 100%;
    }

    /* Ad spaces */
    .ad-space-top {
      width: 100%;
      height: 90px;
      margin-bottom: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-1);
      border: 2px solid rgba(255,255,255,0.2);
    }
    
    .ad-space-top-above-how-to-use {
      width: 100%;
      height: 200px;
      margin-bottom: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-1);
      border: 2px solid rgba(255,255,255,0.2);
    }
    
    .ad-placeholder {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    .ad-text {
      color: white;
      font-weight: 700;
      font-size: 14px;
      text-align: center;
      padding: 10px;
    }

    /* Loading indicator */
    .loading{
      opacity:.95;
      position:relative;
    }
    
    .loading::after{
      content:'';
      width:16px;
      height:16px;
      border-radius:50%;
      border:2px solid rgba(255,255,255,0.5);
      border-top-color:rgba(255,255,255,0.95);
      position:absolute;
      right:14px;
      top:50%;
      transform:translateY(-50%);
      animation: spin .9s linear infinite;
    }
    
    @keyframes spin{ 
      to{ 
        transform: translateY(-50%) rotate(360deg) 
      } 
    }

    /* Hidden class */
    .hidden{ display:none !important; }

    /* ========== RESPONSIVE DESIGN ========== */
    
    /* Large screens */
    @media (max-width: 1200px) {
      .main-wrapper {
        flex-direction: column;
        padding: 0 15px;
      }
      
      .ad-space-left, .ad-space-right {
        width: 100%;
        height: 120px;
        position: static;
        margin: 20px 0;
        min-height: auto;
      }
      
      .main-content {
        width: 100%;
        padding: 0;
      }
      
      .steps-container {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    /* Medium screens */
    @media (max-width: 992px) {
      .tool-card {
        max-width: 90%;
        margin: 0 auto 40px auto;
      }
      
      .features-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      
      .steps-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
      }
    }

    /* Tablets and small screens - ADDED DROPDOWN NAVIGATION */
    @media (max-width: 767px) {
      .container {
        padding: 15px 0;
      }
      
      .topbar {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        position: relative;
      }
      
      /* Mobile Navigation Toggle */
      .mobile-nav-toggle {
        display: block;
        margin-left: auto;
      }
      
      /* Navigation Styles for Mobile */
      nav.topnav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-1);
        border: 1px solid rgba(16,24,40,0.06);
        z-index: 1000;
        margin-top: 10px;
      }
      
      nav.topnav.active {
        display: flex;
      }
      
      nav.topnav a {
        width: 100%;
        padding: 12px 20px;
        border-radius: 0;
        text-align: left;
        border-bottom: 1px solid rgba(16,24,40,0.03);
      }
      
      nav.topnav a:last-child {
        border-bottom: none;
      }
      
      nav.topnav a:hover {
        background: rgba(99,102,241,0.06);
      }
      
      .hero-left {
        padding: 0;
      }
      
      h1 {
        font-size: 28px;
        text-align: center;
      }
      
      .sub {
        text-align: center;
      }
      
      .features-grid {
        grid-template-columns: 1fr;
      }
      
      .steps-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
      }
      
      .tool-card {
        padding: 20px;
        max-width: 95%;
      }
      
      .uploader {
        padding: 20px;
      }
      
      .actions-row {
        flex-direction: column;
      }
      
      .btn {
        width: 100%;
      }
      
      .how-to-use h2 {
        font-size: 26px;
        margin-bottom: 30px;
      }
      
      .how-to-use {
        padding: 30px 0;
      }
      
      .step-card {
        padding: 20px;
      }
      
      .features {
        padding: 20px;
      }
    }

    /* Mobile screens */
    @media (max-width: 576px) {
      .main-wrapper {
        padding: 0 10px;
      }
      
      .container {
        padding: 10px 0;
      }
      
      h1 {
        font-size: 24px;
      }
      
      .sub {
        font-size: 14px;
      }
      
      .how-to-use h2 {
        font-size: 22px;
      }
      
      .ad-space-top, .ad-space-top-above-how-to-use {
        height: 70px;
      }
      
      .uploader .icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
      }
      
      .uploader .title {
        font-size: 16px;
      }
      
      .uploader .desc {
        font-size: 13px;
      }
      
      .step-card {
        padding: 18px;
      }
      
      .step-title {
        font-size: 16px;
      }
      
      .step-description {
        font-size: 13px;
      }
      
      .features {
        padding: 15px;
        margin-top: 25px;
      }
      
      .feature-card {
        padding: 15px;
      }
      
      .kicker {
        font-size: 12px;
        text-align: center;
        display: block;
      }
      
      .tool-card {
        padding: 15px;
      }
    }

    /* Small mobile screens */
    @media (max-width: 480px) {
      .brand-title {
        font-size: 16px;
      }
      
      .kicker {
        font-size: 12px;
      }
      
      .features {
        padding: 15px 10px;
      }
      
      .feature-card {
        padding: 12px;
      }
      
      .uploader {
        padding: 15px;
      }
      
      .tool-card {
        padding: 12px;
      }
      
      .steps-container {
        padding: 0 5px;
        gap: 10px;
      }
      
      .step-card {
        padding: 15px 10px;
      }
      
      .step-number {
        width: 30px;
        height: 30px;
        font-size: 14px;
      }
      
      .step-title {
        font-size: 15px;
      }
      
      .step-description {
        font-size: 12px;
      }
      
      .file-item {
        padding: 8px;
      }
      
      .file-name {
        font-size: 13px;
      }
    }

    /* Extra small screens */
    @media (max-width: 360px) {
      .main-wrapper {
        padding: 0 5px;
      }
      
      .brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
      
      .uploader .icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
      }
      
      .btn {
        font-size: 14px;
        padding: 8px 12px;
      }
      
      .steps-container {
        grid-template-columns: 1fr;
      }
      
      .tool-card {
        padding: 10px;
      }
    }