:root {
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --heading-color: #0f172a;
    --primary-color: #6366f1;
    --border-color: #e2e8f0;
    --gradient-start: #6366f1;
    --gradient-end: #4f46e5;
}

[data-theme="dark"] {
    --background-color: #0f172a;
    --card-background: #1e293b;
    --text-color: #e2e8f0;
    --text-secondary: #94a3b8;
    --heading-color: #f8fafc;
    --primary-color: #818cf8;
    --border-color: #334155;
    --gradient-start: #818cf8;
    --gradient-end: #6366f1;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
}

/* Demo Page Styles */
.demo-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    padding: 8rem 2rem 6rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.demo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="rgba(255,255,255,0.05)"/></svg>') repeat;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.demo-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, #e2e8f0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.demo-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Demo Section */
.demo-section {
    padding: 4rem 0;
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.demo-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.demo-header h2 {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.demo-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.demo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Table Container */
.analysis-table-container {
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0 auto;
}

.table-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-background);
}

.header-content h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.table-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.table-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.example-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: var(--background-color);
    color: var(--text-color);
    border-color: var(--text-secondary);
}

/* Table Styles */
.table-wrapper {
    overflow-x: auto;
    padding: 1rem;
    background: var(--card-background);
}

.analysis-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.analysis-table th {
    padding: 1.25rem;
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.analysis-table td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-background);
    vertical-align: middle;
}

.analysis-table tr:hover td {
    background: var(--background-color);
}

/* Column Widths */
.feedback-col { width: 35%; }
.category-col { width: 15%; }
.priority-col { width: 15%; }
.sentiment-col { width: 15%; }
.action-col { width: 20%; }

.feedback-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category Badge */
.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

/* Priority Badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.priority-high {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.priority-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.priority-low {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Impact Indicators */
.sentiment-cell {
    white-space: nowrap;
}

.sentiment-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    vertical-align: middle;
    margin-right: 0.75rem;
}

.sentiment-positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.sentiment-negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.sentiment-neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Action Cell */
.action-cell {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-background);
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin: 0;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 2rem;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.example-grid .example-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1.25rem;
    height: 100%;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.example-grid .example-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.example-grid .example-btn i {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.example-grid .example-btn span {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Navigation */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.logo:hover {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-links a:not(.cta-button)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transform: scaleX(0);
    opacity: 0;
    transition: all 0.2s ease;
}

.nav-links a:not(.cta-button):hover {
    color: var(--primary-color);
}

.nav-links a:not(.cta-button):hover::after {
    transform: scaleX(1);
    opacity: 1;
}

.nav-links .cta-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    border: none;
}

.nav-links .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    opacity: 0.95;
    color: white;
}

.nav-links .cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .nav-links .cta-button {
    box-shadow: 0 2px 10px rgba(129, 140, 248, 0.2);
}

[data-theme="dark"] .nav-links .cta-button:hover {
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .demo-container {
        max-width: 1000px;
    }

    .analysis-table td,
    .analysis-table th {
        padding: 1rem;
    }
}

@media (max-width: 992px) {
    .demo-container {
        max-width: 800px;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .table-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .demo-section {
        padding: 2rem 0;
    }

    .demo-header h2 {
        font-size: 2rem;
    }

    .demo-container {
        padding: 0 1rem;
    }

    .example-grid {
        grid-template-columns: 1fr;
    }

    .feedback-text {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .table-controls {
        flex-direction: column;
        width: 100%;
    }

    .example-btn,
    .clear-btn {
        width: 100%;
        justify-content: center;
    }

    .demo-title-section {
        padding: 3rem 1rem;
    }

    .demo-title-section h1 {
        font-size: 2.5rem;
    }

    .demo-title-section h1 .subtitle {
        font-size: 1rem;
    }

    .nav-container {
        padding: 0.75rem 1.5rem;
    }

    .nav-links, .theme-toggle {
        display: none;
    }

    .logo {
        font-size: 1.5rem;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .demo-title-section h1 {
        font-size: 2rem;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .example-grid .example-btn {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .example-grid .example-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Main Content */
.demo-main {
    padding-top: 4rem;
    min-height: 100vh;
    background: var(--background-color);
}

/* Title Section */
.demo-title-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, 
        var(--background-color) 0%,
        var(--card-background) 100%
    );
    position: relative;
    overflow: hidden;
}

.demo-title-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.2;
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.demo-title-section h1 .highlight {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.demo-title-section h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 50%, 
        transparent 100%
    );
    transform: scaleX(0.8);
    opacity: 0.5;
}

.demo-title-section h1 .subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Features Overview */
.features-overview {
    padding: 6rem 0;
    background: var(--background-color);
}

.features-overview h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    background: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.text-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.text-center h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}
