/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
  }
  a {
    text-decoration: none;
    color: inherit;
  }
  
  /* Header */
  header {
    background: linear-gradient(45deg, #4CAF50, #81C784);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
  }
  
  /* Main Container */
  #container {
    display: flex;
    max-width: 1400px;
    margin: 20px auto;
    gap: 20px;
    padding: 0 10px;
    align-items: flex-start;
  }
  
  /* Main Content */
  #main-content {
    flex: 1;
    background: #fff;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    min-height: 70vh;
  }
  
  /* Sidebar (Fixed) */
  #sidebar {
    width: 320px;
    position: sticky;
    top: 20px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    height: fit-content;
  }
  
  /* Drag & Drop Uploader */
  #drop-zone {
    border: 2px dashed #bbb;
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    color: #777;
    margin-bottom: 20px;
    cursor: pointer;
  }
  #drop-zone.hover {
    border-color: #4CAF50;
    background-color: #e8f5e9;
    color: #4CAF50;
  }
  #drop-zone .icon {
    font-size: 48px;
    margin-bottom: 10px;
  }
  #upload-preview img {
    max-width: 80px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
  }
  
  /* Tabs */
  .tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .tab-button {
    flex: 1;
    padding: 10px;
    background: #eee;
    border: 1px solid #ccc;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
  }
  .tab-button.active {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
  }
  .tab-content {
    display: none;
    margin-bottom: 20px;
  }
  .tab-content.active {
    display: block;
  }
  
  /* Buttons */
  button {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    margin-top: 5px;
  }
  button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: #43A047;
  }
  button:active {
    transform: scale(0.95);
    background: #388E3C;
  }
  button:focus {
    outline: 2px solid #4CAF50;
  }
  
  /* Preview Section */
  #preview-container {
    margin-top: 20px;
  }
  #preview-items .preview-item {
    display: inline-block;
    margin: 10px;
    text-align: center;
  }
  #preview-items img {
    max-width: 200px;
    border: 1px solid #ccc;
    border-radius: 3px;
  }
  
  /* Loading Spinner */
  .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    display: none;
  }
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Sidebar Sections */
  .sidebar-section {
    display: none;
    margin-bottom: 20px;
  }
  .sidebar-section.active {
    display: block;
  }
  
  /* Google Ads Placeholder */
  #google-ads-placeholder {
    border: 2px dashed #ccc;
    padding: 10px;
    text-align: center;
    margin-top: 20px;
  }
  
  /* Footer */
  footer {
    background: #4CAF50;
    color: #fff;
    text-align: center;
    padding: 15px;
    margin-top: 20px;
  }
  footer a {
    margin: 0 10px;
    color: #fff;
  }
  
  /* Error Message */
  #error-message {
    color: red;
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
  }
  
  /* Responsive for Narrow Screens */
  @media (max-width: 768px) {
    #container {
      flex-direction: column;
      align-items: stretch;
    }
    #sidebar {
      position: static;
      width: 100%;
      margin: 0;
      margin-top: 20px;
    }
  }
  