/**
 * DC QR CODES - QR Generator Styles
 * FIXED: Spacing, centering, overlapping issues
 * Author: Denis Casian
 * https://qr.deniscasian.com
 */

/* ============================================
   Header
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    padding: 0 24px;
    height: 64px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.brand-text {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c084fc, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.header-link:hover {
    color: #c084fc;
    background: rgba(139, 92, 246, 0.1);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    color: #9ca3af;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-switcher:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
}

.lang-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .site-header {
        padding: 0 16px;
    }
    
    .header-link span:last-child {
        display: none;
    }
    
    .header-link {
        padding: 8px;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.page-hero {
    text-align: center;
    padding: 32px 16px 24px;
}

.hero-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.text-gradient-purple {
    background: linear-gradient(135deg, #c084fc, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1rem;
    color: #9ca3af;
    max-width: 450px;
    margin: 0 auto;
    line-height: 1.5;
}

.hero-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-size: 0.813rem;
}

.hero-feature-icon {
    color: #22c55e;
}

/* ============================================
   Ad Slots - CENTERED
   ============================================ */
.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto;
    width: 100%;
}

.ad-slot:empty {
    display: none;
}

.ad-header {
    max-width: 728px;
    min-height: 90px;
}

.ad-inline {
    max-width: 300px;
    min-height: 250px;
    margin: 32px auto;
}

.ad-between {
    max-width: 468px;
    min-height: 60px;
    margin: 32px auto;
}

@media (max-width: 768px) {
    .ad-header {
        max-width: 320px;
        min-height: 50px;
    }
    
    .ad-between {
        max-width: 320px;
        min-height: 50px;
    }
}

/* Ad Placeholder */
.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    min-height: inherit;
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: rgba(139, 92, 246, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hide ads for licensed users */
body.ads-disabled .ad-slot,
body.has-license .ad-slot {
    display: none !important;
}

/* ============================================
   Storage Notice
   ============================================ */
.storage-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto 24px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

.storage-notice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.storage-notice-content {
    flex: 1;
}

.storage-notice-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
}

.storage-notice-text {
    font-size: 0.75rem;
    color: #9ca3af;
}

.storage-notice-close {
    padding: 4px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
}

.storage-notice-close:hover {
    opacity: 1;
}

/* ============================================
   Generator Section - FIXED SPACING
   ============================================ */
.generator-section {
    padding: 0 16px;
    margin-bottom: 32px;
}

.generator-container {
    max-width: 800px;
    margin: 0 auto;
}

.generator-card {
    background: rgba(30, 27, 75, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .generator-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Form Side
   ============================================ */
.generator-form {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid rgba(139, 92, 246, 0.1);
}

@media (max-width: 768px) {
    .generator-form {
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    }
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-icon {
    font-size: 1rem;
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content Input - FULL WIDTH, NO WHITE BOX */
.content-input-wrapper {
    position: relative;
}

.content-input {
    width: 100%;
    min-height: 80px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: #f5f5f7;
    font-size: 0.938rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.content-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.content-input::placeholder {
    color: #6b7280;
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.688rem;
    color: #6b7280;
    pointer-events: none;
}

.char-count.warning {
    color: #f59e0b;
}

.char-count.error {
    color: #ef4444;
}

/* Color Pickers */
.color-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 500px) {
    .color-row {
        grid-template-columns: 1fr;
    }
}

.color-picker-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.color-picker-box:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.color-picker-box input[type="color"] {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-picker-box input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-box input[type="color"]::-webkit-color-swatch {
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.color-label {
    font-size: 0.688rem;
    color: #9ca3af;
}

.color-hex {
    font-size: 0.813rem;
    color: #6b7280;
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* Size Slider */
.size-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.size-slider {
    width: 100%;
    height: 6px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.2);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.size-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    cursor: pointer;
    border: none;
}

.size-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.688rem;
    color: #6b7280;
}

.size-display {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #a78bfa;
}

.size-display span:last-child {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

/* Options */
.options-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Checkbox - FIXED INLINE */
.checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-item input {
    display: none;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-item input:checked + .checkbox-box {
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    border-color: transparent;
}

.checkbox-item input:checked + .checkbox-box::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 0.875rem;
    color: #e5e5e5;
    white-space: nowrap;
}

/* Select Dropdown - FIXED DARK BACKGROUND */
.form-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: #e5e5e5;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a78bfa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: all 0.2s;
}

.form-select:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.form-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-select option {
    background: #1a1a2e;
    color: #e5e5e5;
    padding: 12px;
}

/* Generate Button - PROMINENT */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    margin-top: 8px;
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.generate-btn::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: left 0.5s;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generate-btn-icon {
    font-size: 1.2rem;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Preview Side - CENTERED
   ============================================ */
.generator-preview {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    min-height: 400px;
}

@media (max-width: 768px) {
    .generator-preview {
        padding: 24px 20px;
        min-height: 350px;
    }
}

/* Placeholder */
.preview-placeholder {
    text-align: center;
    color: #6b7280;
}

.preview-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.preview-placeholder-text {
    font-size: 0.875rem;
    max-width: 180px;
    line-height: 1.5;
}

/* Preview Content - CENTERED */
.preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.qr-frame {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        0 0 60px rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.qr-frame:hover {
    transform: scale(1.02);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.25),
        0 0 80px rgba(139, 92, 246, 0.15);
}

.qr-frame canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.preview-info {
    text-align: center;
}

.preview-url {
    font-size: 0.875rem;
    color: #9ca3af;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.preview-dimensions {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Download Buttons - CENTERED */
.download-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 260px;
}

.download-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    border: 1px solid;
}

.download-btn.png {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.download-btn.png:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.download-btn.svg {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.download-btn.svg:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

.download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   History Section - FIXED SPACING
   ============================================ */
.history-section {
    max-width: 800px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

.history-card {
    background: rgba(30, 27, 75, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 24px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.history-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.history-count {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.clear-history-btn {
    padding: 8px 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* History Grid */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.history-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.history-qr {
    background: white;
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 10px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.history-text {
    font-size: 0.688rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-meta {
    font-size: 0.625rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
}

.history-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.history-btn {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    font-size: 0.625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
    text-align: center;
}

.history-btn.use {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.history-btn.use:hover {
    background: rgba(139, 92, 246, 0.25);
}

.history-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.history-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Empty History */
.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.history-empty-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.4;
}

.history-empty-title {
    font-size: 1rem;
    color: #9ca3af;
    margin-bottom: 4px;
}

.history-empty-text {
    font-size: 0.875rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    padding: 48px 24px 24px;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    background: rgba(0, 0, 0, 0.5);
    margin-top: auto;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (max-width: 800px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-brand {
    max-width: 260px;
}

@media (max-width: 500px) {
    .footer-brand {
        max-width: 100%;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 500px) {
    .footer-logo {
        justify-content: center;
    }
}

.footer-logo img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.footer-logo span {
    font-size: 0.938rem;
    font-weight: 700;
    color: #f5f5f7;
}

.footer-desc {
    font-size: 0.813rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 14px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

@media (max-width: 500px) {
    .footer-social {
        justify-content: center;
    }
}

.social-link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 8px;
    color: #9ca3af;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
    transform: translateY(-2px);
}

.footer-column h4 {
    font-size: 0.813rem;
    font-weight: 600;
    color: #e5e5e5;
    margin-bottom: 14px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    font-size: 0.813rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #a78bfa;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 500px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.footer-copyright {
    font-size: 0.813rem;
    color: #6b7280;
}

.footer-copyright a {
    color: #a78bfa;
    text-decoration: none;
}

.footer-legal {
    display: flex;
    gap: 16px;
}

.footer-legal a {
    font-size: 0.813rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: #a78bfa;
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}


/* ===== HOW TO SECTION ===== */
.how-to-section {
    max-width: 800px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

.how-to-card {
    background: rgba(30, 27, 75, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 24px;
}

.how-to-header {
    margin-bottom: 24px;
    text-align: center;
}

.how-to-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.how-to-steps {
    display: grid;
    gap: 16px;
}

@media (min-width: 768px) {
    .how-to-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

.how-to-step {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.how-to-step:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f7;
    margin-bottom: 6px;
}

.step-content p {
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

/* ===== SEO SECTION ===== */
.seo-section {
    max-width: 800px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

.seo-card {
    background: rgba(30, 27, 75, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 28px;
}

.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #c084fc, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.seo-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e5e5e5;
    margin-top: 24px;
    margin-bottom: 10px;
}

.seo-content > p {
    font-size: 0.938rem;
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 16px;
}

.seo-features-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: grid;
    gap: 10px;
}

@media (min-width: 768px) {
    .seo-features-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.seo-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: #9ca3af;
    padding: 12px 14px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.2s ease;
}

.seo-features-list li:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

.seo-features-list li::before {
    content: "✓";
    color: #a78bfa;
    font-weight: 700;
    flex-shrink: 0;
}

.seo-cta {
    margin-top: 28px;
    padding: 20px;
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.seo-cta p {
    color: white;
    font-size: 1.063rem;
    font-weight: 600;
    margin: 0;
}

/* Footer link icon */
.footer-link-icon {
    margin-right: 4px;
}


/* ============================================
   History Items - Overflow Fix
   ============================================ */

/* Prevent grid children from overflowing */
.history-grid {
    overflow: hidden;
    width: 100%;
}

/* History item card - contain all content */
.history-item {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

/* All flex/grid children must allow shrinking */
.history-item > * {
    min-width: 0;
}

/* The main content/URL text - THIS is the overflow culprit */
.history-item-content {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    display: block;
    word-break: break-all; /* Break long URLs without spaces */
}

/* QR image - prevent stretch */
.history-item-qr {
    flex-shrink: 0;
    overflow: hidden;
}

.history-item-qr img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Meta info row */
.history-item-meta {
    overflow: hidden;
    min-width: 0;
    flex-wrap: wrap;
}

.history-item-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action buttons - prevent wrapping issues */
.history-item-actions {
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 4px;
}

/* ============================================
   Preview Section - Overflow Fix
   ============================================ */

.generator-preview {
    overflow: hidden;
    min-width: 0;
}

.preview-content,
#previewContent {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.preview-info {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.preview-url,
#previewUrl {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

.preview-dimensions,
#previewDimensions {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* QR frame canvas */
.qr-frame {
    overflow: hidden;
    max-width: 100%;
}

.qr-frame canvas {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Generator Grid - Prevent child overflow
   ============================================ */

.generator-grid {
    overflow: hidden;
}

.generator-grid > * {
    min-width: 0;
}