/* Public Health Index Info - Global Health Intelligence Platform */
:root {
    --primary-color: #059669;
    --secondary-color: #047857;
    --accent-color: #10b981;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --dark-bg: #064e3b;
    --card-bg: #065f46;
    --surface-bg: #047857;
    --text-primary: #ecfdf5;
    --text-secondary: #d1fae5;
    --text-muted: #a7f3d0;
    --aptos-green: #00d4aa;
    --gradient-primary: linear-gradient(135deg, #059669 0%, #047857 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.25);
}

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

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Introduction Page */
.intro-page {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Health Background Animation */
.health-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.health-particle {
    position: absolute;
    font-size: 3rem;
    opacity: 0.1;
    animation: healthFloat 10s ease-in-out infinite;
    user-select: none;
}

.health-particle:nth-child(even) {
    animation-delay: 2s;
}

.health-particle:nth-child(3n) {
    animation-delay: 4s;
}

@keyframes healthFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.1; 
    }
    25% { 
        transform: translateY(-40px) rotate(10deg); 
        opacity: 0.2; 
    }
    50% { 
        transform: translateY(-20px) rotate(-5deg); 
        opacity: 0.15; 
    }
    75% { 
        transform: translateY(-35px) rotate(15deg); 
        opacity: 0.25; 
    }
}

/* Introduction Content */
.intro-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Introduction Header */
.intro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.logo-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.aptos-verification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--aptos-green);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

/* Introduction Main */
.intro-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

/* Hero Section */
.hero-section {
    text-align: left;
}

.health-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 3rem;
}

.health-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateX(10px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.metric-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.25rem;
}

.metric-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Features Preview */
.features-preview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-highlight {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.feature-highlight:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

/* Introduction Footer */
.intro-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--surface-bg);
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.trust-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* Right-side AI ASK Button */
.ai-ask-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    cursor: pointer;
    animation: slideInRight 1s ease-out 2s both;
}

@keyframes slideInRight {
    from { 
        transform: translateX(100px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

.ask-btn-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 1.25rem 1.75rem;
    border-radius: 30px;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.ai-ask-button:hover .ask-btn-content {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.4);
}

.ask-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ask-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.ask-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

.ask-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    background: var(--primary-color);
    opacity: 0.3;
    animation: askPulse 2s infinite;
    z-index: 1;
}

@keyframes askPulse {
    0% { 
        transform: scale(1); 
        opacity: 0.3; 
    }
    100% { 
        transform: scale(1.15); 
        opacity: 0; 
    }
}

/* Health Chat Modal */
.health-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.health-chat-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    animation: modalSlideUp 0.3s ease-out;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.modal-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aptos-green);
    animation: pulse 2s infinite;
}

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

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--dark-bg);
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    flex: 1;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.message-content p:last-child {
    margin-bottom: 0;
}

.health-capabilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.capability {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.capability i {
    color: var(--accent-color);
    width: 16px;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--gradient-accent);
    border-color: var(--accent-color);
}

.user-message .message-avatar {
    background: var(--surface-bg);
}

.chat-input-section {
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0 0 20px 20px;
}

.quick-health-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.health-action-btn {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.health-action-btn:hover {
    background: var(--accent-color);
    color: white;
}

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

.chat-input {
    flex: 1;
    padding: 1rem;
    background: var(--dark-bg);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-button {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.input-footer {
    text-align: center;
}

.aptos-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.aptos-indicator i {
    color: var(--aptos-green);
}

/* Simple Footer */
.simple-footer {
    background: var(--card-bg);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2rem 0;
}

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

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-left span:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.footer-left span:last-child {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-right a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: var(--accent-color);
}

.aptos-badge-small {
    width: 32px;
    height: 32px;
    background: var(--aptos-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .intro-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .logo-text h1 {
        font-size: 2rem;
    }
    
    .intro-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .ai-ask-button {
        bottom: 20px;
        right: 20px;
    }
    
    .ask-text {
        display: none;
    }
    
    .health-capabilities {
        grid-template-columns: 1fr;
    }
    
    .quick-health-actions {
        flex-direction: column;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .metric-number {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-section {
        padding: 1rem 1.5rem;
    }
}
