/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066FF;
    --secondary-color: #00D1FF;
    --text-color: #1A1A1A;
    --light-gray: #F5F5F5;
    --border-color: #E5E5E5;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
}

/* Header and Navigation */
header {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    height: 70px;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    background: white;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo svg {
    height: 32px;
    width: auto;
}

.logo:hover {
    opacity: 0.8;
}

.logo-text {
    display: inline-block;
    margin-left: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    white-space: nowrap;
    padding: 0.5rem 0;
}

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

.contact-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background: #0052cc;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 6rem 2rem;
    text-align: center;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features Section */
.features-section {
    padding: 6rem 2rem;
    background: white;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
}

.feature-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
}

.feature-list li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0.5rem;
}

.feature-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: color 0.2s ease;
}

.feature-link:hover {
    color: #0052cc;
}

/* Main content */
main {
    min-height: 100vh;
    padding-top: 70px;
    background: #f5f7f9;
}

.content-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-icon {
    font-size: 1.5rem;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #3498db;
}

/* Footer */
footer {
    background: #1A1A1A;
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-section p {
    color: #999;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #999;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.footer-bottom p {
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .features-grid,
    .markets-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        gap: 1.5rem;
    }

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

.api-key-form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.api-input {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    width: 300px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.api-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3498db;
    background: white;
}

.submit-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background: #2ecc71;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background: #27ae60;
}

.api-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* File Upload Styles */
.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.file-upload-wrapper {
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.file-label i {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.file-name {
    margin-top: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.parse-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parse-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.parse-button:not(:disabled):hover {
    background: #2980b9;
}

/* Results Container Styles */
.results-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.parsed-content {
    background: white;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.text-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.control-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #2c3e50;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.control-button:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
}

.control-button i {
    font-size: 0.9rem;
}

.extracted-text-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
}

.extracted-text {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    font-size: 0.95rem;
}

.extracted-text pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

/* Scrollbar Styles */
.extracted-text-container::-webkit-scrollbar {
    width: 8px;
}

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

.extracted-text-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.extracted-text-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Processing Status Styles */
.processing-status {
    padding: 1rem;
    background: #e8f4fd;
    border-radius: 5px;
    margin-bottom: 1rem;
    color: #0056b3;
    text-align: center;
    font-weight: 500;
}

/* Summary Styles */
.summary-container {
    padding: 1rem;
}

.summary-container h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.summary-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.summary-section h4 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-section p {
    color: #2c3e50;
    line-height: 1.6;
    margin: 0;
}

/* Requirements Section Styles */
.requirements-container {
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.requirement-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.requirement-section:last-child {
    margin-bottom: 0;
}

.requirement-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.requirement-section p {
    color: #555;
    margin-bottom: 1rem;
}

.requirement-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.requirement-section ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0;
    list-style-type: none;
}

.requirement-section ul li {
    position: relative;
    padding: 0.3rem 0;
    padding-left: 1rem;
}

.requirement-section ul li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: -0.8rem;
}

.requirement-section ol > li {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.requirement-section strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Responsive adjustments for requirements */
@media (max-width: 768px) {
    .requirement-section {
        padding: 1rem;
    }

    .requirement-section h3 {
        font-size: 1.1rem;
    }

    .requirement-section ol {
        padding-left: 1.2rem;
    }

    .requirement-section ul {
        padding-left: 1rem;
    }
}

/* Requirements and System Prompt Styles */
.input-section {
    margin-bottom: 2rem;
}

.input-section:last-child {
    margin-bottom: 0;
}

.input-section h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.input-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.requirements-input {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
    margin-bottom: 1rem;
}

.requirements-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.requirements-input::placeholder {
    color: #95a5a6;
    font-size: 0.9rem;
    font-style: italic;
}

/* Button Group Styles */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.action-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
}

.action-button:hover:not(:disabled) {
    background-color: #0052cc;
    transform: translateY(-1px);
}

.action-button:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.7;
}

.action-button i {
    font-size: 1.1rem;
}

.parse-button {
    background: #3498db;
}

.parse-button:not(:disabled):hover {
    background: #2980b9;
}

.review-button {
    background: #2ecc71;
}

.review-button:not(:disabled):hover {
    background: #27ae60;
}

/* API Key Section */
.api-key-section {
    width: 100%;
    max-width: 500px;
    margin-top: 1rem;
}

.api-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: white;
    transition: all 0.3s ease;
}

.api-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* System Prompt Styles */
.system-prompt-section {
    margin-top: 1rem;
}

.system-prompt-section h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.system-prompt-input {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: white;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.system-prompt-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Review Results Styles */
.review-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.review-results h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2ecc71;
}

.review-content {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
}

.review-content section {
    margin-bottom: 1.5rem;
}

.review-content h5 {
    color: #3498db;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.review-content ul {
    list-style-type: none;
    padding-left: 1.5rem;
}

.review-content ul li {
    position: relative;
    margin-bottom: 0.5rem;
}

.review-content ul li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: -1rem;
}

/* Markdown Styles */
.markdown-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #24292e;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-body h1 {
    font-size: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

.markdown-body h2 {
    font-size: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

.markdown-body h3 {
    font-size: 1.25em;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 2em;
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-body code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

.markdown-body pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
}

.markdown-body pre code {
    padding: 0;
    margin: 0;
    font-size: 100%;
    word-break: normal;
    white-space: pre;
    background: transparent;
    border: 0;
}

.markdown-body blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin: 0 0 16px 0;
}

.markdown-body hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

.markdown-body table {
    border-spacing: 0;
    border-collapse: collapse;
    margin-bottom: 16px;
    width: 100%;
    overflow: auto;
}

.markdown-body table th,
.markdown-body table td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.markdown-body table tr {
    background-color: #fff;
    border-top: 1px solid #c6cbd1;
}

.markdown-body table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* Template Card Styles */
.feature-card.template-card {
    background: white;
    border: 1px solid #eaeaea;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.feature-card.template-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.feature-card.template-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.template-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.template-view-btn, .template-select-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 100px;
    background: white;
    color: #333;
    transition: background-color 0.2s;
}

.template-view-btn:hover, .template-select-btn:hover {
    background: #f5f5f5;
}

.template-select-btn {
    background: var(--primary-color);
    color: white;
    border: none;
}

.template-select-btn:hover {
    background: #0052cc;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

#modalTitle {
    color: #1a1a1a;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.75rem;
    font-weight: 600;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feature-card.template-card {
        padding: 2rem 1.5rem;
    }

    .template-buttons {
        padding: 0;
        flex-direction: column;
        align-items: center;
    }

    .template-view-btn, .template-select-btn {
        width: 100%;
        max-width: 200px;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
    }
}

/* Builder Container Styles */
.builder-container {
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* Multiple File Upload Styles */
.file-upload-wrapper.multiple .file-label {
    min-height: 150px;
}

.file-upload-wrapper.multiple small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.85rem;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.file-item i {
    margin-right: 0.5rem;
    color: #6c757d;
}

.file-item .file-status {
    margin-left: auto;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Format Options Styles */
.format-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.format-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.format-option:hover {
    border-color: #cfd4da;
}

.format-option.active {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.format-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.format-option label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
}

.radio-button {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #6c757d;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.radio-button:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: transform 0.2s ease;
}

input[type="radio"]:checked + label .radio-button {
    border-color: var(--primary-color);
}

input[type="radio"]:checked + label .radio-button:after {
    transform: translate(-50%, -50%) scale(1);
}

.option-title {
    font-size: 1.1rem;
    color: #2c3e50;
}

.recommended-badge {
    background: #e3f2fd;
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    margin-left: auto;
}

.format-content {
    margin-left: 2.5rem;
}

.format-content textarea:not(:disabled),
.format-content select:not(:disabled) {
    background: white;
    border-color: #ced4da;
    cursor: text;
}

.format-content textarea:disabled,
.format-content select:disabled {
    background: #e9ecef;
    border-color: #dee2e6;
    cursor: not-allowed;
    color: #6c757d;
}

.format-content textarea:focus:not(:disabled),
.format-content select:focus:not(:disabled) {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.format-description {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.template-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    color: #495057;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.template-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(46,88,207,0.1);
}

.template-select:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

#customFormatInput {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    color: #495057;
    font-size: 1rem;
    transition: all 0.2s ease;
    resize: vertical;
}

#customFormatInput:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

#customFormatInput:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(46,88,207,0.1);
}

@media (max-width: 768px) {
    .format-option {
        padding: 1rem;
    }
    
    .format-content {
        margin-left: 2rem;
    }
    
    .recommended-badge {
        display: none;
    }
}

/* Active Navigation Link */
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Student page specific styles */
.file-upload-wrapper.multiple {
    margin-bottom: 1.5rem;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.file-item i {
    margin-right: 0.5rem;
    color: #6c757d;
}

.file-item .file-status {
    margin-left: auto;
    font-size: 0.8rem;
    color: #6c757d;
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.format-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.format-option label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.format-option textarea {
    margin-left: 1.5rem;
    margin-top: 0.25rem;
}

.generated-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.markdown-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #24292e;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-body h1 {
    font-size: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

.markdown-body h2 {
    font-size: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
}

.markdown-body h3 {
    font-size: 1.25em;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 2em;
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-body code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

.markdown-body pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
}

.markdown-body pre code {
    padding: 0;
    margin: 0;
    font-size: 100%;
    word-break: normal;
    white-space: pre;
    background: transparent;
    border: 0;
}

.markdown-body blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin: 0 0 16px 0;
}

.markdown-body hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

.markdown-body table {
    border-spacing: 0;
    border-collapse: collapse;
    margin-bottom: 16px;
    width: 100%;
    overflow: auto;
}

.markdown-body table th,
.markdown-body table td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}

.markdown-body table tr {
    background-color: #fff;
    border-top: 1px solid #c6cbd1;
}

.markdown-body table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* Chat Container */
.chat-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    height: calc(100vh - 140px);
}

/* Chat Main Area */
.chat-main {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
}

/* Message Styles */
.message {
    max-width: 85%;
    padding: 16px;
    border-radius: 16px;
    position: relative;
    animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 102, 255, 0.1);
}

.message.assistant {
    background: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message.system {
    background: #fff3e0;
    max-width: 90%;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #666;
}

.message-header i {
    font-size: 1rem;
}

.message.user .message-header {
    color: #1565c0;
}

.message.assistant .message-header {
    color: #2e7d32;
}

.message-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.message.user .message-content {
    color: #1565c0;
}

/* Code Block Styling */
.message-content pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    border: 1px solid #e0e0e0;
}

.message-content code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

/* Suggestion Buttons */
.suggestion-buttons {
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
    background: white;
}

.suggestion-button {
    background: #f0f7ff;
    color: #0066FF;
    border: 1px solid #bbdefb;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-button:hover {
    background: #e3f2fd;
    border-color: #90caf9;
    transform: translateY(-1px);
}

/* Chat Input Area */
.chat-input-container {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: white;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    resize: none;
    min-height: 24px;
    max-height: 150px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.send-button {
    background: #0066FF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: #0052cc;
    transform: scale(1.05);
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 100px;
}

.typing-animation {
    display: flex;
    gap: 4px;
}

.typing-animation .dot {
    width: 8px;
    height: 8px;
    background: #90a4ae;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-animation .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-animation .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* Context Sidebar */
.context-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.upload-section, .system-prompt-section {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.upload-section h3, .system-prompt-section h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 12px;
}

.file-upload-wrapper {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.file-upload-wrapper:hover {
    border-color: #0066FF;
    background: #f8f9fa;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
}

.file-label i {
    font-size: 2rem;
    color: #0066FF;
}

.file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.file-item i {
    color: #0066FF;
}

.file-status {
    margin-left: auto;
    font-size: 0.8rem;
    color: #666;
}

.system-prompt-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
}

.system-prompt-input:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

/* Error Message Styling */
.error-message {
    background: #ffebee;
    padding: 16px;
    border-radius: 8px;
    color: #c62828;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.error-message i {
    font-size: 1.5rem;
}

.error-message small {
    color: #666;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .chat-container {
        grid-template-columns: 1fr 250px;
    }
}

@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
    }
    
    .context-sidebar {
        display: none;
    }
    
    .message {
        max-width: 90%;
    }
    
    .suggestion-buttons {
        padding: 12px;
    }
    
    .chat-input-container {
        padding: 12px;
    }
}

/* Markets Section */
.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.market-region {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.market-region h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.market-region h3 i {
    color: var(--primary-color);
}

.market-region ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.market-region ul li {
    margin-bottom: 0.5rem;
    color: #666;
    padding-left: 1rem;
    position: relative;
}

.market-region ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.benefit-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.benefit-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.benefit-card p {
    color: #666;
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.cta-section h2 {
    color: #333;
    margin-bottom: 1rem;
}

.cta-section p {
    color: #666;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

@media (max-width: 576px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Search Section Styles */
.search-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.search-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,102,255,0.1);
}

.search-button {
    padding: 0 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
}

.search-button:hover {
    background: #0052cc;
} 