/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Academic Color Palette */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary-color: #7c3aed;
    --secondary-light: #ede9fe;
    --accent-color: #06b6d4;
    --accent-light: #cffafe;
    --success-color: #059669;
    --success-light: #eefff6;
    --warning-color: #d97706;
    --warning-light: #fef3c7;
    --error-color: #dc2626;
    --error-light: #fee2e2;
    --info-color: #0284c7;
    --info-light: #e0f2fe;
    
    /* Modern Grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    
    /* Academic Gradients */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    --gradient-info: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-colored: 0 10px 15px -3px rgb(79 70 229 / 0.1), 0 4px 6px -4px rgb(79 70 229 / 0.1);
    
    /* Modern Border Radius */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --border-radius-2xl: 24px;
    
    /* Smooth Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-size: 15px;
    font-weight: 400;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* Header */
.header {
    background: var(--white);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo i {
    font-size: 32px;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.1));
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.tagline {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Main Content */
.main-content {
    /* padding: 32px 0; */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.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: var(--transition);
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-colored);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(79 70 229 / 0.2), 0 8px 10px -6px rgb(79 70 229 / 0.2);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--white);
    box-shadow: 0 4px 6px -1px rgb(5 150 105 / 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(5 150 105 / 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.link-btn:hover {
    color: var(--primary-hover);
}

/* Cards */
.upload-card, .preview-card, .query-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.upload-card:before, .preview-card:before, .query-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    /* background: var(--gradient-primary); */
}

/* Step Progress Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 20px;
    background: var(--primary-light);
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--primary-color);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.step-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.step-description {
    color: var(--gray-600);
    font-size: 14px;
    margin-left: auto;
}

/* Upload Section */
.upload-header {
    text-align: center;
    margin-bottom: 32px;
}

.upload-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.upload-header h2 i {
    color: var(--primary-color);
    font-size: 28px;
}

.upload-header p {
    color: var(--gray-600);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.upload-area {
    border: 3px dashed var(--gray-300);
    border-radius: var(--border-radius-xl);
    padding: 64px 32px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--gray-50);
    position: relative;
    overflow: hidden;
}

.upload-area:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.upload-area:hover:before, .upload-area.drag-over:before {
    opacity: 0.05;
}

.upload-icon {
    position: relative;
    z-index: 1;
}

.upload-icon i {
    font-size: 64px;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    display: block;
}

.upload-text {
    position: relative;
    z-index: 1;
}

.upload-text p {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.upload-text p:last-child {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-600);
}

.upload-info {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 24px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    display: inline-block;
}

.sample-data {
    text-align: center;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

.sample-data p {
    font-size: 15px;
    color: var(--gray-600);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-info {
    display: flex;
    gap: 8px;
}

.info-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 4px 8px;
    border-radius: var(--border-radius);
    font-size: 12px;
    font-weight: 500;
}

/* Tables */
.table-container, .results-table-container {
    max-height: 361px;
    overflow: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.data-table, .results-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td,
.results-table th, .results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
}

.data-table th, .results-table th {
    background: var(--gray-50);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tr:hover, .results-table tr:hover {
    background: var(--gray-50);
}

/* Preview Actions */
.preview-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Query Section */
.query-section {
    margin-top: 40px;
    padding: 32px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--purple-light) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.query-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--purple-color), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.query-section h3 {
    color: var(--gray-800);
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.query-section h3::before {
    /* content: '🔮';
    font-size: 28px; */
}

/* Table Description Section */
.table-description-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--white);
    border: 2px solid var(--info-color);
    border-radius: var(--border-radius-lg);
    position: relative;
    box-shadow: var(--shadow-md);
}

.description-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.description-header h4 {
    color: var(--gray-800);
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-header h4::before {
/*     content: '📋';
    font-size: 20px;
 */}

.description-toggle {
    background: linear-gradient(135deg, var(--info-color), var(--purple-color));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.description-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.description-content {
    margin-top: 16px;
}

.description-input {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
    background: var(--gray-50);
    font-family: var(--font-family);
}

.description-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: scale(1.01);
}

.description-input::placeholder {
    color: var(--gray-400);
    font-style: italic;
}

.description-help {
    margin-top: 12px;
    padding: 16px;
    background: var(--info-light);
    border-radius: var(--border-radius);
    font-size: 13px;
    color: var(--gray-700);
    border-left: 4px solid var(--info-color);
}

.description-help strong {
    color: var(--info-color);
    font-weight: 700;
}

.description-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.auto-description-status {
    font-size: 12px;
    color: var(--gray-600);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auto-description-status.generating {
    color: var(--warning-color);
}

.auto-description-status.generated {
    color: var(--success-color);
}

.query-input-container {
    margin-bottom: 24px;
}

.query-input-wrapper {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    position: relative;
}

#queryInput {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    font-family: var(--font-family);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    background: var(--gray-50);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    width: -webkit-fill-available;
    line-height: inherit;
}

#queryInput:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: scale(1.01);
}

#queryInput::placeholder {
    color: var(--gray-400);
    font-style: italic;
}

.query-btn {
    height: fit-content;
    align-self: flex-end;
}

.example-queries h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-queries h4::before {
    content: '💡';
    font-size: 18px;
}

.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.example-btn {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
    padding: 10px 16px;
    border-radius: var(--border-radius-lg);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.example-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--purple-light));
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.example-note {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--info-light), var(--purple-light));
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-lg);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.example-note i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 16px;
}

.example-loading {
    padding: 12px;
    text-align: center;
    color: var(--gray-600);
    font-size: 12px;
}

.example-loading i {
    margin-right: 6px;
    color: var(--blue-500);
}

.column-info {
    margin-top: 16px;
    padding: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 12px;
}

.column-info-header {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-info-header i {
    margin-right: 6px;
    color: var(--blue-500);
}

.toggle-column-info {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: var(--transition);
}

.toggle-column-info:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.column-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--gray-100);
}

.column-item i {
    color: var(--gray-500);
    width: 12px;
}

.column-name {
    font-weight: 500;
    color: var(--gray-800);
    flex: 1;
}

.column-type {
    font-size: 10px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Privacy Controls */
.privacy-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.privacy-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.privacy-text strong {
    font-weight: 600;
    color: var(--gray-800);
}

.privacy-text small {
    display: block;
    color: var(--gray-600);
}

#privacy-info-btn {
    color: var(--primary-color);
}

.privacy-option {
    margin-top: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
}

.privacy-option h5 {
    margin-bottom: 8px;
    color: var(--primary-color);
}

.privacy-note {
    margin-top: 16px;
    padding: 12px;
    background: var(--success-light);
    border-left: 4px solid var(--success-color);
    border-radius: var(--border-radius);
    color: var(--success-color);
    font-weight: 600;
}

.privacy-controls:before {
    content: '🔒';
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    opacity: 0.3;
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.privacy-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-color);
    border-radius: 6px;
    background: var(--white);
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
    margin-top: 2px;
    margin-bottom: -4px;
    margin-right: 7px;
}

.privacy-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--gradient-primary);
    border-color: var(--gradient-primary);
    transform: scale(1.1);
}

.fa-circle-info:before, .fa-info-circle:before {
    font-size: 19px;
}

.privacy-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '\2713';
    position: absolute;
    top: -4px;
    left: 2px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.privacy-text {
    font-size: 14px;
    color: var(--gray-800);
    line-height: 1.5;
    font-weight: 500;
}

.privacy-text i {
    color: var(--success-color);
    margin-right: 6px;
    font-size: 16px;
}

.privacy-text small {
    display: block;
    color: var(--gray-600);
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
    font-weight: 400;
}

/* Privacy Information */
.privacy-info-btn {
    background: none;
    border: none;
    color: var(--info-color);
    cursor: pointer;
    margin-left: 8px;
    font-size: 16px;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.privacy-info-btn:hover {
    background: var(--info-light);
    transform: scale(1.1);
}

.privacy-details {
    margin-top: 16px;
    padding: 20px;
    background: var(--white);
    border: 2px solid var(--info-color);
    border-radius: var(--border-radius-lg);
    font-size: 13px;
    animation: slideDown 0.3s ease-out;
    box-shadow: var(--shadow-md);
}

.privacy-details.hidden {
    display: none;
}

.privacy-explanation h5 {
    margin: 0 0 16px 0;
    color: var(--gray-800);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-option {
    margin: 12px 0;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.privacy-option strong {
    color: var(--success-color);
    font-weight: 700;
}

.privacy-option em {
    color: var(--gray-600);
    font-style: italic;
    font-size: 12px;
}

.privacy-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--success-light);
    border-radius: var(--border-radius);
    color: var(--success-color);
    font-weight: 600;
    border-left: 4px solid var(--success-color);
    font-size: 13px;
}

/* Privacy mode indicator */
.example-queries .privacy-indicator {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.75em;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.privacy-indicator.basic {
    background: #e8f4f8;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.privacy-indicator.enhanced {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 24px;
    height: 383px;
    overflow-y: auto;
}

.help-section {
    margin-bottom: 24px;
}

.help-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.help-section ul {
    margin-left: 20px;
    margin-top: 8px;
}

.help-section li {
    margin-bottom: 4px;
    color: var(--gray-600);
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of everything */
}

.loading-content {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-lg);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.toast {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 18px 24px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-xl);
    min-width: 350px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideIn 0.3s ease-out;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    backdrop-filter: blur(10px);
    border-width: 2px;
}

.toast.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.toast.success {
    border-left: 4px solid var(--success-color);
    background: var(--white);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.toast.error {
    border-left: 4px solid var(--error-color);
    background: var(--white);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
    background: var(--white);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

.toast.info {
    border-left: 4px solid var(--info-color);
    background: var(--white);
    color: var(--info-color);
    border: 1px solid var(--info-color);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.toast-message {
    flex: 1;
    font-weight: 600;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: currentColor;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: var(--transition);
    min-width: 20px;
    margin-left: auto;
    align-self: flex-start;
}

.toast-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* AI Status Indicator */
.ai-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--border-radius-lg);
    font-size: 13px;
    font-weight: 600;
    margin-right: 16px;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.ai-status: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: var(--transition-fast);
}

.ai-status.loading {
    background: var(--gradient-warm);
    color: var(--white);
    border-color: var(--warning-color);
}

.ai-status.loading:before {
    animation: shimmer 2s infinite;
}

.ai-status.ready {
    background: var(--gradient-success);
    color: var(--white);
    border-color: var(--success-color);
}

.ai-status.fallback {
    background: var(--gradient-info);
    color: var(--white);
    border-color: var(--info-color);
}

.ai-status i {
    font-size: 16px;
    animation: none;
}

.ai-status.loading i {
    animation: spin 2s linear infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Privacy Badge */
.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 5px;
    background: var(--success-light);
    color: var(--success-color);
    border-radius: var(--border-radius);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(5, 150, 105, 0.2);
    text-align: -webkit-center;
    margin-left: 5px;
}

.privacy-badge i {
    font-size: 15px;
}

/* Enhanced Query Input */
.ai-suggestion {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 8px 12px;
    font-size: 12px;
    color: var(--gray-600);
    z-index: 10;
    display: none;
}

.ai-suggestion.show {
    display: block;
}

.query-complexity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-500);
}

.complexity-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
}

.complexity-indicator.active {
    background: var(--primary-color);
}

.complexity-indicator.simple {
    background: var(--success-color);
}

.complexity-indicator.moderate {
    background: var(--warning-color);
}

.complexity-indicator.complex {
    background: var(--error-color);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
}

/* Query Metadata Styles */
.query-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.metadata-item i {
    font-size: 10px;
    opacity: 0.7;
    align-content: center;
}

#copySqlBtn i {
    align-content: center;
}

.metadata-item.auto-query {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border-color: #2563eb;
    animation: subtle-pulse 2s ease-in-out;
}

.metadata-item.auto-query i {
    opacity: 1;
}

.metadata-item.complexity-Simple {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.metadata-item.complexity-Medium {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.metadata-item.complexity-Complex {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

/* Rate Limit Status Indicator */
.rate-limit-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-700);
    margin-right: 16px;
    transition: var(--transition);
    cursor: help;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.rate-limit-status::before {
    /* content: '🔋';
    font-size: 14px; */
}

.rate-limit-status.warning {
    background: var(--warning-light);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.rate-limit-status.warning::before {
    content: '⚠️';
}

.rate-limit-status.danger {
    background: var(--error-light);
    border-color: var(--error-color);
    color: var(--error-color);
    animation: pulse 2s ease-in-out infinite;
}

.rate-limit-status.danger::before {
    content: '🚨';
}

.rate-limit-status i {
    font-size: 10px;
    opacity: 0.8;
}

.rate-limit-status.warning i {
    color: var(--warning-color);
    opacity: 1;
}

.rate-limit-status.danger i {
    color: var(--error-color);
    opacity: 1;
}

/* Table Description Styles */
.table-description-container {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.description-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-header h4 i {
    color: var(--primary-color);
    font-size: 13px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.description-input-wrapper {
    position: relative;
}

#tableDescriptionInput {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 200px;
    line-height: inherit;
    background: var(--gray-50);
    transition: var(--transition);
}

#tableDescriptionInput:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

#tableDescriptionInput.generating {
    background: var(--gray-50);
    border-color: var(--warning-color);
}

.description-help {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 8px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.4;
}

.description-help i {
    color: var(--warning-color);
    font-size: 10px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Loading state for description generation */
.description-generating {
    position: relative;
}

.description-generating::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translateY(-50%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .query-input-wrapper {
        flex-direction: column;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .example-buttons {
        flex-direction: column;
    }
    
    .example-btn {
        width: 100%;
        text-align: left;
    }

    .table-description-container {
        margin-bottom: 16px;
        padding: 12px;
    }
    
    .description-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .btn-sm {
        width: 100%;
    }
}

/* Query Workspace Layout */
.query-workspace {
    display: flex;
    gap: 24px;
    height: calc(100vh - 120px); /* Full height minus header */
    margin-top: 2rem;
}

.workspace-controls {
    width: 380px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 24px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.workspace-main {
    flex-grow: 1;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 24px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.control-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.control-panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Collapsible Sections */
.collapsible .collapse-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
}

.collapsible .collapse-toggle .fa-chevron-down {
    transition: transform 0.3s ease;
}

.collapsible .collapse-toggle.active .fa-chevron-down {
    transform: rotate(180deg);
}

.collapse-content {
    padding-top: 12px;
    display: none; /* Initially hidden */
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 16px;
}

.tab-link {
    padding: 12px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tab-header h4 {
    font-size: 16px;
    font-weight: 600;
}

/* Chart Picker */
.chart-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.chart-picker-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    min-width: 80px;
    position: relative;
}

.chart-picker-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.chart-picker-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
    font-weight: 700;
}

.chart-picker-btn.recommended::after {
    content: '★';
    position: absolute;
    top: 4px;
    right: 4px;
    color: var(--warning-color);
    font-size: 14px;
}

.chart-picker-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-100);
}

.chart-picker-btn i {
    font-size: 24px;
    color: var(--primary-color);
}

.chart-picker-btn span {
    font-size: 12px;
    font-weight: 500;
}

.chart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    min-height: 400px; /* Ensure a minimum height for the container */
    position: relative;
}

.ai-explanation{
    margin-bottom: 2rem;
}

.chart-item {
    flex: 1 1 45%; /* Allow items to grow and shrink, with a base of 45% width */
    min-width: 300px; /* Minimum width for a chart item */
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.chart-item h3 {
    font-size: 1.1em;
    color: var(--gray-700);
    margin-bottom: 10px;
    text-align: center;
}

.chart-item canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 350px; /* Max height for individual charts */
}

@media (max-width: 1024px) {
    .query-workspace {
        flex-direction: column;
        height: auto;
    }
    .workspace-controls {
        width: 100%;
    }
}

/* Modern Footer */
.footer {
    margin-top: 60px;
    padding: 32px 0;
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    color: var(--gray-100);
    text-align: center;
    border-top: 3px solid var(--primary-color);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--purple-color), var(--info-color), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer h3 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer p {
    color: var(--gray-300);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.footer-link:hover {
    color: var(--primary-color);
    background: var(--gray-800);
    transform: translateY(-2px);
}

.footer-privacy {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-700);
    font-size: 12px;
    color: var(--gray-400);
}

/* Results Loader Styles */
.results-loader {
    width: 100%;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.results-loader-content {
    max-width: 600px;
    width: 90%;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.results-loader-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.loader-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    position: relative;
    transition: var(--transition);
}

.loader-step.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.loader-step.completed {
    background: var(--success-light);
    border-color: var(--success-color);
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-500);
    border: 2px solid var(--gray-300);
    transition: var(--transition);
}

.loader-step.active .step-icon {
    color: var(--primary-color);
    border-color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

.loader-step.completed .step-icon {
    color: var(--success-color);
    border-color: var(--success-color);
    background: var(--success-light);
}

.loader-step.completed .step-icon::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.step-label {
    font-weight: 600;
    color: var(--gray-700);
    flex: 1;
}

.loader-step.active .step-label {
    color: var(--primary-color);
}

.loader-step.completed .step-label {
    color: var(--success-color);
}

.step-progress {
    width: 0;
    height: 4px;
    background: var(--primary-color);
    position: absolute;
    bottom: 0;
    left: 0;
    transition: width 0.5s ease-out;
}

.loader-step.active .step-progress {
    animation: progress 2s forwards;
}

.loader-step.completed .step-progress {
    width: 100%;
    background: var(--success-color);
}

.results-loader-message {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 20px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-color);
}

@keyframes progress {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --gray-100: #e0e0e0;
        --gray-200: #c0c0c0;
        --gray-300: #a0a0a0;
    }
}

.footer {
    padding: 20px 0;
    background-color: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e9ecef;
    margin-top: 40px;
}

.footer p {
    margin: 0;
    color: #6c757d;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
        /* Additional styles for the hero section */
.hero-section {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 150px);
    align-content: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.hero-btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.hero-btn-primary {
    background: white;
    color: #4f46e5;
}

.hero-btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #888;
    backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: #4f46e5;
    background: #e0e7ff;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1e293b;
}

.feature-description {
    color: #64748b;
    line-height: 1.6;
}

.table-format-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 40px;
    margin: 40px 0;
    border: 1px solid #e2e8f0;
}

.table-format-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-format-description {
    margin-bottom: 30px;
    color: #64748b;
    line-height: 1.6;
}

.format-example {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.format-example table {
    width: 100%;
    border-collapse: collapse;
}

.format-example th, .format-example td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.format-example th {
    background: #f1f5f9;
    font-weight: 600;
}

.format-tips {
    margin-top: 30px;
    background: var(--primary-light);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
}

.format-tips h4 {
    color: var(--primary-color);;
    margin-bottom: 10px;
    font-weight: 600;
}

.format-tips ul {
    margin-left: 20px;
    color: #334155;
}

.format-tips li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .features-section {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-title {
        font-size: 36px;
    }
}
@media (max-width: 480px) {
    .privacy-badge i {
        font-size: 11px;
    }
    .ai-status i {
        font-size: 13px;
    }
}