* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 32px;
}

.title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 32px;
}

.input-section {
    margin-bottom: 24px;
}

.label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

.input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-generate {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-generate:active {
    transform: translateY(0);
}

.results-container {
    margin-top: 24px;
    max-height: 600px;
    overflow-y: auto;
    padding: 8px;
}

.section-header {
    font-size: 18px;
    font-weight: 600;
    color: #1976d2;
    padding: 16px 16px 8px 16px;
    margin-top: 16px;
}

.section-header:first-child {
    margin-top: 0;
}

.result-row {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.result-row:hover {
    background-color: #f8f9fa;
}

.result-label {
    flex: 0 0 40%;
    font-size: 14px;
    color: #666;
}

.result-value {
    flex: 1;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    word-break: break-all;
}

.error-message {
    padding: 16px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Scrollbar styling */
.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tab Navigation */
.tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    flex: 1;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button:hover {
    color: #667eea;
    background-color: #f8f9fa;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
}

.file-label:hover,
.file-upload-wrapper.dragover .file-label {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.file-text {
    font-size: 14px;
    color: #666;
}

.file-info {
    margin-bottom: 16px;
    min-height: 24px;
}

.file-info-success {
    padding: 8px 12px;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 14px;
}

.file-info-error {
    padding: 8px 12px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    font-size: 14px;
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-generate:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Progress Bar */
.progress-container {
    margin-top: 16px;
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 12px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Bulk Results */
.bulk-summary {
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.bulk-summary h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.table-wrapper {
    width: 100%;
    max-height: 500px;
    overflow: auto;
    margin-top: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.results-table thead {
    background-color: #667eea;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}

.results-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.results-table td {
    padding: 10px 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    white-space: nowrap;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn-download {
    flex: 1;
    min-width: 150px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-excel {
    background: linear-gradient(135deg, #217346 0%, #2d8654 100%);
}

.btn-csv {
    background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-download:active {
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .title {
        font-size: 24px;
    }

    .result-row {
        flex-direction: column;
    }

    .result-label {
        margin-bottom: 4px;
    }

    .tab-button {
        font-size: 14px;
        padding: 10px 16px;
    }

    .results-table {
        font-size: 10px;
    }

    .results-table th,
    .results-table td {
        padding: 8px 4px;
        font-size: 9px;
    }

    .download-buttons {
        flex-direction: column;
    }

    .btn-download {
        width: 100%;
    }
}

