/* ============================================
   Earning Robot Website Styles - Modern Design
   ============================================ */

/* ============================================
   CSS Variables - Light Mode
   ============================================ */
:root {
    /* Primary gradient colors */
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    
    /* Light mode colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-color: #2d3748;
    --text-light: #718096;
    --text-lighter: #a0aec0;
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
    --bg-lighter: #edf2f7;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

/* ============================================
   Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e2e8f0;
        --text-light: #cbd5e0;
        --text-lighter: #a0aec0;
        --bg-color: #1a202c;
        --bg-light: #2d3748;
        --bg-lighter: #4a5568;
        --border-color: #4a5568;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.6);
        --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.7);
    }
}

/* Manual dark mode toggle class */
body.dark-mode {
    --text-color: #e2e8f0;
    --text-light: #cbd5e0;
    --text-lighter: #a0aec0;
    --bg-color: #1a202c;
    --bg-light: #2d3748;
    --bg-lighter: #4a5568;
    --border-color: #4a5568;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.7);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style-position: inside;
}

/* ============================================
   Navigation - Enhanced
   ============================================ */
.navbar {
    background: var(--bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}

.nav-brand a:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    margin: 0;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: var(--spacing-sm) 0;
    position: relative;
    transition: var(--transition-fast);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: var(--transition);
}

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

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
    padding: var(--spacing-sm);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

/* ============================================
   Hero Section - Enhanced
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: clamp(4rem, 10vw, 8rem) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--spacing-lg);
    font-weight: 800;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-slogan {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    font-weight: 500;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto var(--spacing-2xl);
    opacity: 0.9;
    line-height: 1.7;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

/* ============================================
   Buttons - Enhanced
   ============================================ */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 4rem 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.section .lead {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 3rem;
}

.bg-light {
    background-color: var(--bg-light);
}

/* ============================================
   Mission Grid
   ============================================ */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.mission-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.mission-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.mission-item .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mission-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ============================================
   Architecture Diagram
   ============================================ */
.architecture-diagram {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 3rem 0;
}

.arch-layer {
    margin: 2rem 0;
}

.arch-layer h4 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.arch-components {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.arch-component {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.component-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.arch-arrow {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* ============================================
   Workflow Steps
   ============================================ */
.workflow-steps {
    margin-top: 3rem;
}

.workflow-steps h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.workflow-list {
    max-width: 600px;
    margin: 0 auto;
    counter-reset: workflow-counter;
    list-style: none;
}

.workflow-list li {
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    position: relative;
    counter-increment: workflow-counter;
}

.workflow-list li::before {
    content: counter(workflow-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============================================
   Advantages Grid
   ============================================ */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.advantage-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.advantage-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.advantage-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.advantage-card ul {
    list-style: none;
    margin-top: 1rem;
}

.advantage-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.advantage-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
}

/* ============================================
   Demo Panel
   ============================================ */
.demo-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.demo-chat,
.demo-stats {
    display: flex;
    flex-direction: column;
}

.demo-chat h3,
.demo-stats h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.chat-messages {
    flex: 1;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

.chat-message.user {
    background: var(--primary-color);
    color: white;
    margin-left: 20%;
}

.chat-message.bot {
    background: white;
    border: 1px solid var(--border-color);
    margin-right: 20%;
}

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

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

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

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-profit .stat-value {
    color: var(--success-color);
}

/* ============================================
   Flow Visualization
   ============================================ */
.flow-visualization {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.flow-visualization h4 {
    margin-bottom: 1rem;
    text-align: center;
}

.flow-chart {
    min-height: 150px;
}

.flow-empty {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
}

.flow-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

.flow-item.income {
    border-left: 4px solid var(--success-color);
}

.flow-item.expense {
    border-left: 4px solid var(--danger-color);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-section h2 {
    color: white;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.cta-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-card h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.support-options {
    text-align: center;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.support-options h3 {
    color: white;
}

.support-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.support-buttons .btn-outline {
    border-color: white;
    color: white;
}

.support-buttons .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* ============================================
   Features Summary
   ============================================ */
.features-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.features-column {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.features-column h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.features-column ul {
    list-style: none;
}

.features-column ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.features-column ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* ============================================
   Demo Note
   ============================================ */
.demo-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 2rem;
    text-align: center;
    color: #856404;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

/* ============================================
   Footer Enhancement
   ============================================ */
.footer-social {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   Accessibility Improvements
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #4299e1;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-slogan {
        font-size: 1.2rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .demo-panel {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

    .arch-components {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section {
        padding: 2rem 0;
    }
}
