/* CSS Variables */
:root {
    --primary-color: #0ea5e9;
    --secondary-color: #0284c7;
    --accent-color: #38bdf8;
    --dark-color: #0f172a;
    --light-color: #f0f9ff;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --cloud-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --aptos-green: #00d4aa;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --shadow-2xl: 0 25px 50px rgba(0,0,0,0.25);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-color);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

.cloud-particle {
    position: absolute;
    width: 60px;
    height: 30px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 30px;
    animation: cloudFloat 15s ease-in-out infinite;
}

.cloud-particle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.cloud-particle:nth-child(2) {
    top: 30%;
    right: 20%;
    animation-delay: 3s;
    animation-duration: 18s;
}

.cloud-particle:nth-child(3) {
    bottom: 40%;
    left: 15%;
    animation-delay: 6s;
    animation-duration: 22s;
}

.cloud-particle:nth-child(4) {
    top: 60%;
    right: 10%;
    animation-delay: 9s;
    animation-duration: 16s;
}

.cloud-particle:nth-child(5) {
    bottom: 20%;
    left: 50%;
    animation-delay: 12s;
    animation-duration: 24s;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0.3; }
    25% { transform: translateY(-20px) translateX(10px) scale(1.1); opacity: 0.5; }
    50% { transform: translateY(-10px) translateX(-15px) scale(0.9); opacity: 0.7; }
    75% { transform: translateY(-30px) translateX(5px) scale(1.05); opacity: 0.4; }
}

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

/* Intro Header */
.intro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.2rem;
}

.logo-text span {
    font-size: 1rem;
    color: var(--gray-400);
    font-family: 'JetBrains Mono', monospace;
}

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

/* Intro Content */
.intro-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 2rem 0;
}

/* Hero Section */
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--white);
}

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

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

/* Metrics Preview */
.metrics-preview {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(14, 165, 233, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    flex: 1;
}

.metric-icon {
    width: 50px;
    height: 50px;
    background: var(--cloud-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    font-family: 'JetBrains Mono', monospace;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--gray-400);
}

/* Features Highlight */
.features-highlight {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.feature-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    color: var(--gray-300);
}

.feature-highlight i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 24px;
}

/* Aptos Integration */
.aptos-integration {
    margin-bottom: 2rem;
}

.aptos-badge-large {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--aptos-green);
    color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: fit-content;
}

.aptos-badge-large i {
    font-size: 1.5rem;
}

.badge-title {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
}

.badge-subtitle {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Dashboard Preview */
.dashboard-preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-window {
    background: var(--gray-800);
    border-radius: 12px;
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
}

.window-header {
    background: var(--gray-700);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red { background: #ef4444; }
.control.yellow { background: #f59e0b; }
.control.green { background: #22c55e; }

.window-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--white);
    font-size: 0.9rem;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--success-color);
    font-weight: 600;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.dashboard-content {
    padding: 1.5rem;
}

.dashboard-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-700);
    border-radius: 8px;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-300);
    font-size: 0.9rem;
}

.metric-header i {
    color: var(--primary-color);
}

.dashboard-metric .metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    font-family: 'JetBrains Mono', monospace;
}

.metric-trend {
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.metric-trend.up { color: var(--success-color); }
.metric-trend.down { color: var(--error-color); }

.aptos-verification-dashboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--aptos-green);
    color: var(--white);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

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

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

.floating-ai-ask:hover .ai-ask-content {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

.ai-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 {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
}

.ask-subtitle {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
}

.ai-ask-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    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.1); opacity: 0; }
}

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

.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(5px);
}

.modal-content {
    background: var(--gray-800);
    border-radius: 20px;
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    animation: modalSlideUp 0.3s ease-out;
}

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

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

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.2rem;
}

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

.aptos-verified {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s 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(--gray-900);
}

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

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

.message-content {
    background: var(--gray-800);
    padding: 1.2rem;
    border-radius: 15px;
    flex: 1;
    color: var(--white);
}

.message-content p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

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

.capability-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-300);
}

.capability-item i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 16px;
}

.message-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 1rem;
    display: block;
}

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

.user-message .message-content {
    background: var(--cloud-gradient);
}

.user-message .message-avatar {
    background: var(--gray-600);
}

.chat-input-section {
    padding: 1.5rem 2rem;
    background: var(--gray-800);
    border-top: 1px solid var(--gray-700);
}

.input-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.input-container input {
    flex: 1;
    padding: 1rem;
    background: var(--gray-700);
    border: 2px solid var(--gray-600);
    border-radius: 12px;
    color: var(--white);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-container input::placeholder {
    color: var(--gray-400);
}

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

.send-btn:hover {
    transform: scale(1.05);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.powered-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

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

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.loading-animation {
    text-align: center;
    color: var(--white);
}

.cloud-loader {
    position: relative;
    margin-bottom: 1rem;
}

.cloud-loader i {
    font-size: 3rem;
    color: var(--primary-color);
    animation: cloudBounce 1.5s ease-in-out infinite;
}

@keyframes cloudBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.loader-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

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

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Footer */
.intro-footer {
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--gray-800);
    padding: 1.5rem 0;
}

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

.footer-content p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.footer-badges {
    display: flex;
    gap: 1rem;
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.footer-badge i {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .intro-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .metrics-preview {
        flex-direction: column;
        gap: 1rem;
    }
    
    .floating-ai-ask {
        bottom: 20px;
        right: 20px;
    }
    
    .ai-ask-content {
        padding: 0.75rem 1rem;
    }
    
    .ai-ask-text {
        display: none;
    }
    
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

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