/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.palantir-badge {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard */
.dashboard {
    padding: 40px 20px 80px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0;
}

.hero-section h1 {
    font-size: 42px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.demo-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.metric-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.metric-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.metric-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.metric-value {
    font-size: 36px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
}

.metric-change {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

.positive {
    background: #dcfce7;
    color: #166534;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Graph Panel */
.graph-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-display {
    font-size: 18px;
    font-weight: bold;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

.chart-container {
    height: 400px;
    margin: 24px 0;
    position: relative;
}

.chart-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .chart-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-item {
    text-align: center;
    padding: 16px;
    background: rgba(243, 244, 246, 0.5);
    border-radius: 8px;
}

.info-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.info-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

/* Panel Styles */
.prediction-panel,
.token-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.live-indicator {
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    animation: pulse 2s infinite;
}

/* Prediction Display */
.prediction-display {
    text-align: center;
    padding: 32px;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    background: rgba(59, 130, 246, 0.05);
}

.eta-display {
    font-size: 56px;
    font-weight: 900;
    color: #3b82f6;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.eta-label {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 12px;
}

.scenario-text {
    font-size: 14px;
    color: #4b5563;
    font-style: italic;
}

.prediction-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.detail-item {
    text-align: center;
    padding: 16px;
    background: rgba(243, 244, 246, 0.5);
    border-radius: 8px;
}

.detail-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.detail-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

/* Token Panel */
.token-balance {
    text-align: center;
    margin-bottom: 28px;
    padding: 24px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 12px;
    color: white;
}

.token-count {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 8px;
}

.token-label {
    font-size: 16px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.token-used {
    font-size: 14px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: rgba(107, 114, 128, 0.15);
}

/* Green button for start/ready */
.btn-success {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
    border: none;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    background: linear-gradient(45deg, #16a34a, #15803d);
}

/* Red button for stop/danger */
.btn-danger {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    border: none;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    background: linear-gradient(45deg, #dc2626, #b91c1c);
}

.btn-large {
    padding: 18px 36px;
    font-size: 16px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    display: none;
}

.action-result.show {
    display: block;
}

.action-result.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.action-result.info {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Activity Section */
.activity-section,
.stats-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
}

.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.activity-high {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.activity-medium {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.activity-low {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.activity-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.activity-time {
    font-size: 12px;
    color: #9ca3af;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(99, 102, 241, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Demo Status */
.demo-status {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
    border-radius: 30px;
    color: #166534;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-offline {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulsing {
    animation: pulse 1.5s infinite;
}

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

.surge-active {
    animation: surge-pulse 1s infinite;
}

/* Token price display styling */
#token-price-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#price-icon {
    font-size: 28px;
    transition: all 0.3s ease;
}

#token-price {
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Analytics Section */
.analytics-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 32px;
}

.analytics-badge {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 24px 0;
}

.chart-card {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
    min-height: 700px;
}

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

.chart-card-header {
    margin-bottom: 16px;
}

.chart-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.chart-card-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.chart-image-container {
    border-radius: 8px;
    overflow: hidden;
    background: white;
    padding: 20px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analytics-chart {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}

/* Real Data Insights */
.real-insights {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid rgba(59, 130, 246, 0.2);
}

.real-insights h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
    text-align: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.insight-stat {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.stat-number {
    font-size: 36px;
    font-weight: 900;
    color: #059669;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insights-description {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 8px;
    border-left: 4px solid #059669;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.footer p {
    margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 32px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .prediction-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .demo-controls {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .prediction-panel,
    .token-panel,
    .activity-section,
    .stats-section {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}