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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.modal-content.history-modal {
    max-width: 700px;
    max-height: 80vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    gap: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    flex: 1;
    min-width: 0;
}

.close-btn {
    background: none !important;
    border: none;
    font-size: 20px;
    color: #040404 !important;
    cursor: pointer;
    padding: 0 !important;
    width: 20px !important;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
    flex-shrink: 0;
}

.close-btn:hover {
    color: #2c3e50;
}

.history-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #3498db;
    transition: box-shadow 0.2s;
}

.transaction-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transaction-main {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 14px;
}

.transaction-details {
    margin-bottom: 8px;
    font-size: 13px;
}

.item-type {
    color: #7f8c8d;
    font-weight: 500;
}

.item-ticker {
    color: #3498db;
    font-weight: 600;
}

.transaction-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #95a5a6;
}

.transaction-date {
    color: #7f8c8d;
}

.transaction-app {
    color: #95a5a6;
    font-style: italic;
}

.transaction-amount {
    text-align: right;
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
}

.transaction-amount.negative {
    color: #e74c3c;
}

.transaction-amount.positive {
    color: #27ae60;
}

.transaction-balance {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 500;
    margin-top: 4px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-size: 16px;
}

.popular-item {
    border-left-color: #9b59b6;
}

.popular-item.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.popular-item.clickable:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
    border-left-width: 6px;
}
.transaction-item.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.transaction-item.clickable:hover {
    transform: translateX(4px);
    box-shadow: -4px 0 8px rgba(52, 152, 219, 0.3);
    border-left-width: 6px;
}
.popular-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b59b6;
    opacity: 0.7;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-content button:hover {
    background-color: #2980b9;
}

.demo-btn {
    background-color: #16a085 !important;
    margin-top: 10px !important;
}

.demo-btn:hover {
    background-color: #138d75 !important;
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
}

/* Dashboard Styles */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.history-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.history-btn:hover {
    background-color: #2980b9;
}

.popular-btn {
    padding: 8px 16px;
    background-color: #9b59b6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.popular-btn:hover {
    background-color: #8e44ad;
}

.feed-btn {
    padding: 8px 16px;
    background-color: #16a085;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.feed-btn:hover {
    background-color: #138d75;
}

.shuffle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #e67e22;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.shuffle-btn:hover {
    background-color: #d35400;
}

.buy-coins-btn {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s;
    animation: pulse 2s ease-in-out infinite;
}

.buy-coins-btn:hover {
    background-color: #e67e22;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.coin-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.coin-display svg {
    color: #f39c12;
}

.header button {
    padding: 8px 16px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.header button:hover {
    background-color: #c0392b;
}

.container {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 80px);
    min-height: 600px;
}

.left-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-column {
    flex: 1;
    min-width: 0;
}

.pane {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: auto;
}

.company-info {
    flex: 0 0 auto;
    max-height: 40%;
}

.stock-chart {
    flex: 1;
    min-height: 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header h2 {
    margin-bottom: 0;
}

.settings-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.settings-btn:hover {
    background-color: #e8e8e8;
    border-color: #ccc;
}

.settings-btn.active {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

.settings-btn svg {
    flex-shrink: 0;
}

.transcript {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.transcript-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #95a5a6;
    min-height: 400px;
}

.transcript-placeholder img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transcript-placeholder p {
    font-size: 16px;
    font-weight: 500;
    color: #7f8c8d;
}

.pane h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

#companySelect {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#companyDetails {
    line-height: 1.8;
}

#companyDetails p {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#companyDetails strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 150px;
}

.metrics-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.ticker-item {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

.metric-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.metric-value {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.metric-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
}

.performance-item.positive {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.performance-item.positive .metric-value {
    color: #a5d6a7;
}

.performance-item.negative {
    background: rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.5);
}

.performance-item.negative .metric-value {
    color: #ef9a9a;
}

.performance-item.neutral {
    background: rgba(255, 255, 255, 0.15);
}

/* Locked content styles */
.locked-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    text-align: center;
    gap: 15px;
}

.locked-content.large {
    min-height: 400px;
    padding: 60px 40px;
}

.locked-content svg {
    color: #7f8c8d;
    opacity: 0.6;
}

.locked-content h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
}

.locked-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
    max-width: 400px;
}

.unlock-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.unlock-btn.large {
    padding: 14px 32px;
    font-size: 16px;
}

.description-section {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.description-section > strong {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
}

.qa-block {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.question {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.answer {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
    padding-left: 10px;
}

.text-block {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
    padding: 8px 0;
}

.text-block.preview {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #95a5a6;
}

#transcriptInfo {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

#transcriptContent {
    flex: 1;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 14px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* Speaker Block Styles */
.speaker-block {
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
}

.speaker-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 13px;
    flex-shrink: 0;
}

.speaker-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-operator {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-management {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.badge-analyst {
    background-color: #e8f5e9;
    color: #388e3c;
}

.badge-speaker {
    background-color: #fff3e0;
    color: #f57c00;
}

.speaker-text {
    white-space: pre-wrap;
    line-height: 1.7;
    color: #333;
    font-size: 14px;
}

#stockChart {
    width: 100% !important;
    height: 400px !important;
    max-height: 400px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

/* Quarter highlight on chart */
.chart-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .left-column,
    .right-column {
        flex: none;
    }
    
    .company-info {
        max-height: none;
    }
    
    .speaker-header {
        flex-wrap: wrap;
    }
    
    .avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .speaker-name {
        font-size: 14px;
    }
    
    .badge {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .speaker-text {
        font-size: 13px;
    }
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.time-range-buttons {
    display: flex;
    gap: 5px;
}

.range-btn {
    padding: 6px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.range-btn:hover {
    background: #f0f0f0;
    border-color: #3498db;
}

.range-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.custom-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-range-inputs input[type="date"] {
    padding: 6px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 13px;
    cursor: pointer;
}

.custom-range-inputs input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.custom-range-inputs span {
    color: #666;
    font-size: 13px;
}

/* Public Feed Styles */
.feed-post-section {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-post-section input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 0;
    box-sizing: border-box;
}

.feed-post-section .post-btn {
    padding: 12px 24px;
    background-color: #16a085;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    align-self: flex-start;
    transition: background-color 0.2s;
}

.feed-post-section .post-btn:hover {
    background-color: #138d75;
}

.feed-item {
    border-left-color: #16a085 !important;
}

.feed-item.clickable:hover {
    transform: translateX(4px);
    box-shadow: -4px 0 8px rgba(22, 160, 133, 0.3);
    border-left-width: 6px;
}

.feed-comment {
    margin: 8px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    font-style: italic;
    border-left: 3px solid #16a085;
}

.feed-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a085;
    opacity: 0.7;
}

/* Demo Banner */
.demo-banner {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.demo-banner strong {
    font-size: 18px;
    margin-right: 10px;
}

/* Demo System Styles */
.demo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.demo-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    pointer-events: all;
}

.demo-highlight {
    position: absolute;
    border: 3px solid #3498db;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 10001;
    transition: all 0.3s ease;
}

.demo-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 420px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    z-index: 10002;
    pointer-events: all;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.demo-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.demo-tooltip-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.demo-exit {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.demo-exit:hover {
    color: #333;
}

.demo-tooltip-content {
    padding: 20px 24px;
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
}

.demo-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #f8f9fa;
}

.demo-nav-btn {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.demo-nav-btn:hover {
    background-color: #2980b9;
}

#demoProgress {
    color: #999;
    font-size: 14px;
}
