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

:root {
    --primary: #1a2332;
    --secondary: #2c3e50;
    --accent: #4a90e2;
    --gold: #d4af37;
    --success: #27ae60;
    --light: #f8f9fa;
    --text: #333;
    --text-light: #666;
    --border: #e0e0e0;
}

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

/* Header */
header {
    background: var(--primary);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    color: white;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.logo-section .slash {
    color: var(--gold);
    margin: 0 0.5rem;
}

.alacrity-def {
    font-size: 0.85rem;
    color: var(--gold);
    margin-top: 0.25rem;
    font-style: italic;
    letter-spacing: 0.5px;
}

.tagline {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 0.25rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main Content */
main {
    margin-top: 120px;
    min-height: calc(100vh - 120px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-gold {
    background: var(--gold);
    color: var(--primary);
}

.btn-gold:hover {
    background: #b8941f;
}

/* Sections */
.section {
    display: none;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section.active {
    display: block;
}

.section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 2rem;
    font-weight: 300;
    text-align: center;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 400;
}

/* Deals Grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

.deal-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.deal-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.deal-metrics {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.deal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--light);
    color: var(--text);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Asset Class Configuration */
.asset-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.asset-class-card {
    background: var(--light);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.asset-class-card h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.strategy-checkbox {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    cursor: pointer;
}

.strategy-checkbox input {
    margin-right: 0.5rem;
}

/* AI Analyst Chat */
.ai-analyst {
    background: var(--light);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

.chat-container {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.message.user {
    background: #e3f2fd;
    margin-left: 20%;
}

.message.ai {
    background: #f1f8e9;
    margin-right: 20%;
}

.chat-input {
    display: flex;
    gap: 1rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.file-upload:hover {
    border-color: var(--accent);
    background: var(--light);
}

.file-upload input[type="file"] {
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 800px;
    margin: 5% auto;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
}

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

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light);
    border-radius: 50%;
    border-top: 3px solid var(--accent);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

/* Success Message */
.success-message {
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.footer-text {
    font-size: 0.9rem;
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

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

    .asset-class-grid {
        grid-template-columns: 1fr;
    }
}

/* Messages Container - ADD THIS */
.messages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
    position: relative;
    z-index: 100;
}

/* Alert styles - ADD THIS */
.alert {
    padding: 1rem 2rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--success);
    color: white;
    font-weight: 500;
    border: 1px solid #218838;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Animation for messages - ADD THIS */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Messages Container */
.messages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
    position: relative;
    z-index: 100;
}

/* Alert styles */
.alert {
    padding: 1rem 2rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--success);
    color: white;
    font-weight: 500;
    border: 1px solid #218838;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Animation for messages */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

