 :root {
            --primary: #7c3aed;
            --primary-dark: #5b21b6;
            --secondary: #06b6d4;
            --accent: #f59e0b;
            --dark: #0c0a1f;
            --darker: #070512;
            --light: #ffffff;
            --gray: #6b7280;
            --card-bg: #1a1625;
            --card-border: #2d2438;
            --success: #10b981;
            --error: #ef4444;
            --warning: #f59e0b;
        }
/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* No left/right scroll */
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

/* ===== Layout Containers ===== */
.container {
  width: 100%;
  max-width: 1200px; /* For large screens */
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== Responsive Images & Videos ===== */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Text Scaling ===== */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p  { font-size: 1rem; }

/* ===== Responsive Grid ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.col {
  flex: 1;
  min-width: 250px;
}

/* ===== Buttons ===== */
button, .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #007bff;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}
button:hover, .btn:hover {
  background: #0056b3;
}

/* ===== Navigation ===== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #222;
}
nav a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
}
nav a:hover {
  text-decoration: underline;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
  }
  .row {
    flex-direction: column;
  }
  .col {
    min-width: 100%;
  }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  p  { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  nav a {
    display: block;
    margin: 8px 0;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1rem; }
}

        * {
            box-sizing: border-box;
        }

        body {
            background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #1a1625 100%);
            color: var(--light);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            min-height: 100vh;
            overflow-x: hidden;
        }

        .bg-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
        }

        .bg-gradient {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
                        radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
                        radial-gradient(ellipse at bottom left, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
        }

        .glass-card {
            background: rgba(26, 22, 37, 0.9);
            backdrop-filter: blur(20px);
            border: 1px solid var(--card-border);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
            transition: all 0.3s ease;
        }

        .glass-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
            border-color: rgba(124, 58, 237, 0.3);
        }

        .gradient-text {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .control-input {
            background: rgba(12, 10, 31, 0.8);
            border: 2px solid var(--card-border);
            color: var(--light);
            transition: all 0.3s ease;
        }

        .control-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
            background: rgba(12, 10, 31, 0.95);
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .btn-primary::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: 0.5s;
        }

        .btn-primary:hover::before {
            left: 100%;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 30px rgba(124, 58, 237, 0.5);
        }

        .btn-secondary {
            background: rgba(45, 36, 56, 0.8);
            border: 1px solid var(--card-border);
            color: var(--light);
            transition: all 0.3s ease;
        }

        .btn-secondary:hover {
            background: rgba(124, 58, 237, 0.2);
            border-color: var(--primary);
            transform: translateY(-1px);
        }

        .btn-enhancer {
            background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
            box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .btn-enhancer::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: 0.5s;
        }

        .btn-enhancer:hover::before {
            left: 100%;
        }

        .btn-enhancer:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(245, 158, 11, 0.6);
        }

        .loading-spinner {
            display: none;
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .image-card {
            background: rgba(12, 10, 31, 0.8);
            border: 1px solid var(--card-border);
            transition: all 0.3s ease;
            position: relative;
        }

        .image-card:hover {
            transform: translateY(-4px) scale(1.02);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
            border-color: rgba(124, 58, 237, 0.5);
        }

        .image-container {
            position: relative;
            width: 100%;
            height: 200px;
            overflow: hidden;
            background: linear-gradient(45deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.1));
        }

        .image-container.portrait {
            height: 280px;
        }

        .image-container.square {
            height: 220px;
        }

        .image-container.landscape {
            height: 160px;
        }

        .image-container.ultrawide {
            height: 120px;
        }

        .generated-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: opacity 0.5s ease, transform 0.5s ease;
        }

        .image-card:hover .generated-image {
            transform: scale(1.05);
        }

        .image-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(124, 58, 237, 0.8), rgba(6, 182, 212, 0.6));
            opacity: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            transition: opacity 0.3s ease;
        }

        .image-card:hover .image-overlay {
            opacity: 1;
        }

        .overlay-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .overlay-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .modal.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background: var(--card-bg);
            border-radius: 20px;
            width: 90%;
            max-width: 700px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            transform: scale(0.9);
            transition: transform 0.3s ease;
            border: 1px solid var(--card-border);
        }

        .modal.active .modal-content {
            transform: scale(1);
        }

        .status-message {
            animation: slideInDown 0.5s ease-out;
            border-radius: 12px;
        }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;   /* prevent left-right movement */
  overflow-y: auto;     /* allow up-down scroll */
}

        .status-success {
            background: rgba(16, 185, 129, 0.15);
            color: var(--success);
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .status-error {
            background: rgba(239, 68, 68, 0.15);
            color: var(--error);
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .status-info {
            background: rgba(124, 58, 237, 0.15);
            color: var(--primary);
            border: 1px solid rgba(124, 58, 237, 0.3);
        }

        @keyframes slideInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .history-item {
            transition: all 0.3s ease;
            border-radius: 12px;
        }

        .history-item:hover {
            background: rgba(124, 58, 237, 0.2) !important;
            transform: translateX(5px);
        }

        .resolution-badge {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            font-weight: 600;
            animation: pulse 3s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.8; }
        }

        .feature-highlight {
            background: linear-gradient(45deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.1));
            border-left: 4px solid var(--primary);
            animation: glow 4s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from { box-shadow: 0 0 10px rgba(124, 58, 237, 0.2); }
            to { box-shadow: 0 0 25px rgba(124, 58, 237, 0.4); }
        }

        .sample-prompt {
            background: rgba(45, 36, 56, 0.6);
            border: 1px solid var(--card-border);
            transition: all 0.3s ease;
        }

        .sample-prompt:hover {
            background: var(--primary);
            border-color: var(--primary);
            transform: translateY(-1px);
        }

        .stats-card {
            background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.05));
            border: 1px solid rgba(124, 58, 237, 0.2);
        }

        .enhance-animation {
            animation: enhance-glow 2s ease-in-out;
        }

        @keyframes enhance-glow {
            0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
            50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.5); }
        }

        ::-webkit-scrollbar {
            width: 6px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(12, 10, 31, 0.5);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

        /* PDF Export Optimizations */
        @media print {
            body {
                background: white !important;
                color: black !important;
                overflow: visible !important;
            }
            
            .bg-animation,
            .modal,
            .loading-spinner {
                display: none !important;
            }
            
            .glass-card {
                background: #f8f9fa !important;
                border: 1px solid #dee2e6 !important;
                box-shadow: none !important;
                break-inside: avoid;
            }
            
            .container {
                max-width: none !important;
                padding: 0 !important;
            }
            
            * {
                overflow: visible !important;
                max-height: none !important;
            }

            .history-item, .image-card {
                break-inside: avoid;
            }
        }

        /* Responsive Design - Optimized for single page */
        @media (max-width: 768px) {
            .container {
                padding: 0 16px;
            }
            
            h1 {
                font-size: 2.5rem;
            }
            
            .feature-highlight {
                text-align: center;
            }
        }

        /* PDF-friendly layout adjustments */
        .container {
            max-height: none !important;
        }

        #results, #historyList {
            max-height: none !important;
            overflow: visible !important;
        }
        :root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --dark: #0c0a1f;
  --darker: #070512;
  --light: #ffffff;
  --gray: #6b7280;
  --card-bg: #1a1625;
  --card-border: #2d2438;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* No left/right scroll */
  overflow-y: auto;   /* Only vertical scroll */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #1a1625 100%);
  color: var(--light);
  min-height: 100vh;
}

/* ===== Layout Containers ===== */
.container {
  width: 100%;
  max-width: 1200px; /* For desktops */
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== Responsive Images & Videos ===== */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* ===== Text Scaling ===== */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p  { font-size: 1rem; }

/* ===== Responsive Grid ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.col {
  flex: 1;
  min-width: 250px;
}

/* ===== Buttons ===== */
button, .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}
button:hover, .btn:hover {
  background: var(--primary-dark);
}

/* ===== Navigation ===== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #222;
  flex-wrap: wrap;
}
nav a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
}
nav a:hover {
  text-decoration: underline;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    text-align: center;
  }
  .row {
    flex-direction: column;
  }
  .col {
    min-width: 100%;
  }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  p  { font-size: 0.95rem; }
  .container {
    padding: 0 12px;
  }
  .modal-content {
    width: 95%;
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  nav a {
    display: block;
    margin: 8px 0;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1rem; }
  .btn, button {
    width: 100%;
    text-align: center;
  }
  .image-container {
    height: auto !important; /* auto adjust */
    min-height: 160px;
  }
  .modal-content {
    border-radius: 12px;
  }
}

/* ======= KEEPING YOUR SPECIAL STYLES ======= */
.bg-animation { ... }
.bg-gradient { ... }
.glass-card { ... }
.btn-primary { ... }
.btn-secondary { ... }
.btn-enhancer { ... }
.loading-spinner { ... }
.image-card { ... }
.image-container { ... }
.image-overlay { ... }
.modal { ... }
.modal-content { ... }
.status-message { ... }
.history-item { ... }
.resolution-badge { ... }
.feature-highlight { ... }
.sample-prompt { ... }
.stats-card { ... }
::-webkit-scrollbar { ... }
@media print { ... }
:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --dark: #0c0a1f;
  --darker: #070512;
  --light: #ffffff;
  --gray: #6b7280;
  --card-bg: #1f1b2e;
  --border-radius: 1rem;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #1a1625 100%);
  color: var(--light);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-dark);
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 1.5rem;
  color: var(--primary);
}

/* Buttons */
button,
.btn {
  background: var(--primary);
  color: var(--light);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: 0.3s ease;
  font-weight: 600;
  box-shadow: var(--shadow);
}

button:hover,
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin: 1rem 0;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Responsive Text */
h1, h2, h3, h4, h5 {
  line-height: 1.3;
}

p {
  color: var(--gray);
  line-height: 1.6;
}

/* Footer */
footer {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  border-top: 2px solid var(--primary-dark);
}

/* 🔹 Responsiveness */
@media (max-width: 1024px) {
  header {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }
  header h1 {
    font-size: 1.25rem;
  }
  .container {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  button, .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  header {
    padding: 0.75rem 1rem;
  }
  .card {
    padding: 1rem;
  }
}