:root {
        --primary-color: #6366f1;
        --primary-hover: #4f46e5;
        --secondary-color: #f3f4f6;
        --text-color: #1f2937;
        --light-text: #6b7280;
        --border-color: #e5e7eb;
        --success-color: #10b981;
        --error-color: #ef4444;
        --warning-color: #f59e0b;
        --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        --radius: 8px;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    body {
        background-color: #f9fafb;
        color: var(--text-color);
        line-height: 1.5;
        padding: 1rem;
    }

    .container {
        max-width: 1600px;
        margin: 0 auto;
    }

    header {
        text-align: center;
        margin-bottom: 2rem;
    }

    header h1 {
        font-size: 2.25rem;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
    }

    header p {
        color: var(--light-text);
        font-size: 1.1rem;
    }

    .card {
        background-color: white;
        border-radius: var(--radius);
        box-shadow: var(--card-shadow);
        overflow: hidden;
        margin-bottom: 2rem;
        position: relative;
    }

    .upload-section {
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        overflow: hidden;
        max-height: 1000px;
        opacity: 1;
    }

    .upload-section.collapsed {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .toggle-upload {
        position: absolute;
        right: 1rem;
        top: 1rem;
        background: var(--secondary-color);
        border: none;
        border-radius: 50%;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .toggle-upload:hover {
        background-color: #e5e7eb;
    }

    .file-drop-area {
        border: 2px dashed var(--border-color);
        border-radius: var(--radius);
        padding: 2rem;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-bottom: 1rem;
    }

    .file-drop-area:hover {
        border-color: var(--primary-color);
    }

    .file-drop-area.highlight {
        border-color: var(--primary-color);
        background-color: rgba(99, 102, 241, 0.05);
    }

    .upload-icon {
        font-size: 2.5rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

    .upload-message {
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }

    .file-input {
        display: none;
    }

    .btn {
        display: inline-block;
        padding: 0.6rem 1.2rem;
        background-color: var(--primary-color);
        color: white;
        border: none;
        border-radius: var(--radius);
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .btn:hover {
        background-color: var(--primary-hover);
    }

    /* Generate button styles */
    .generate-btn-container {
        padding: 1rem;
        text-align: center;
        border-top: 1px solid var(--border-color);
        display: none;
    }

    .generate-btn {
        background-color: var(--success-color);
    }

    .generate-btn:hover {
        background-color: #0e9f6e;
    }

    .file-info {
        margin-top: 1rem;
        color: var(--light-text);
        font-size: 0.9rem;
    }

    .tabs {
        display: flex;
        border-bottom: 1px solid var(--border-color);
    }

    .tab {
        padding: 1rem 1.5rem;
        cursor: pointer;
        font-weight: 500;
        border-bottom: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .tab.active {
        color: var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
    }

    .tab-content {
        display: none;
        overflow: auto;
        max-height: 650px;
    }

    .tab-content.active {
        display: block;
    }

    .empty-state {
        text-align: center;
        padding: 3rem 1rem;
        color: var(--light-text);
    }

    .empty-state-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        color: var(--border-color);
    }

    .csv-table {
        width: 100%;
        border-collapse: collapse;
    }

    .csv-table th {
        background-color: var(--secondary-color);
        padding: 0.75rem 1rem;
        text-align: left;
        font-weight: 600;
        position: sticky;
        top: 0;
    }

    .csv-table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 12px;
    }

    .csv-table tr:hover {
        background-color: rgba(99, 102, 241, 0.05);
    }

    .alert {
        padding: 1rem;
        border-radius: var(--radius);
        margin-bottom: 1rem;
        display: none;
    }

    .alert.error {
        background-color: rgba(239, 68, 68, 0.1);
        color: var(--error-color);
        border: 1px solid rgba(239, 68, 68, 0.2);
    }

    .alert.success {
        background-color: rgba(16, 185, 129, 0.1);
        color: var(--success-color);
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

    .alert.warning {
        background-color: rgba(245, 158, 11, 0.1);
        color: var(--warning-color);
        border: 1px solid rgba(245, 158, 11, 0.2);
    }

    /* Output section styles */
    .output-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1.5rem;
    }

    .output-table th {
        background-color: var(--secondary-color);
        padding: 0.75rem 1rem;
        text-align: left;
        font-weight: 600;
        position: sticky;
        top: 0;
    }

    .output-table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 12px;
        vertical-align: top;
    }

    .output-table tr:hover {
        background-color: rgba(99, 102, 241, 0.05);
    }

    .output-table .key-column {
        width: 15%;
        font-weight: 600;
        background-color: #f8fafc;
    }

    .output-table pre {
        white-space: pre-wrap;
        font-family: 'Courier New', monospace;
        font-size: 12px;
        overflow-x: auto;
        max-height: 300px;
    }

    /* Progress bar */
    .progress-container {
        width: 100%;
        background-color: var(--secondary-color);
        border-radius: var(--radius);
        margin: 1rem 0;
        overflow: hidden;
        height: 20px;
        display: none;
    }

    .progress-bar {
        height: 100%;
        background-color: var(--success-color);
        text-align: center;
        line-height: 20px;
        color: white;
        font-size: 12px;
        transition: width 0.3s ease;
        width: 0%;
    }

    .status-text {
        margin-bottom: 1rem;
        text-align: center;
        font-weight: 500;
        color: var(--text-color);
        display: none;
    }

    /* Responsive styles */
    @media (max-width: 768px) {
        body {
            padding: 0.5rem;
        }

        .tab {
            padding: 0.75rem 1rem;
            font-size: 12px;
        }

        .tab-content {
            padding: 0.5rem;
        }
    }

    .output-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
    }

    .output-table th {
        background-color: var(--secondary-color);
        padding: 0.75rem 0.5rem;
        text-align: center;
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 10;
        border: 1px solid var(--border-color);
    }

    .output-table td {
        padding: 0.5rem;
        border: 1px solid var(--border-color);
        vertical-align: top;
    }

    .content-cell {
        word-break: break-word;
        font-size: 11px;
        line-height: 1.4;
    }

    /* Column-specific styling */
    .sku-column {
        width: 8%;
        font-weight: bold;
    }

    .product_desc-column,
    .product_highlights-column,
    .faq-column {
        width: 20%;
    }

    .meta_title-column,
    .meta_desc-column,
    .meta_keywords-column {
        width: 10%;
    }

    .api-key-container {
        margin: 1.5rem auto;
        max-width: 600px;
        background-color: white;
        padding: 1rem;
        border-radius: var(--radius);
        box-shadow: var(--card-shadow);
    }

    .api-key-field {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .api-key-field label {
        font-weight: 500;
        white-space: nowrap;
    }

    .api-key-field input {
        flex-grow: 1;
        padding: 0.5rem;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        font-family: monospace;
    }

    .api-key-toggle {
        margin-left: auto;
        font-size: 0.85rem;
        background: none;
        border: none;
        color: var(--primary-color);
        cursor: pointer;
    }

    .api-key-helper {
        font-size: 0.8rem;
        color: var(--light-text);
        margin-top: 0.5rem;
    }

    .api-key-save {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 0.4rem 0.8rem;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.9rem;
    }

    /* Responsive handling */
    @media (max-width: 1100px) {
        .output-table {
            display: block;
            overflow-x: auto;
            white-space: nowrap;
        }
    }