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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --bg: #0a0e1a;
    --bg-light: #1a1f35;
    --surface: #252b42;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --border: rgba(99, 102, 241, 0.2);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f1f5f9;
        --bg-light: #e2e8f0;
        --surface: #ffffff;
        --text: #0f172a;
        --text-muted: #64748b;
        --border: rgba(99, 102, 241, 0.15);
    }
}

[data-theme="light"] {
    --bg: #f1f5f9;
    --bg-light: #e2e8f0;
    --surface: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] {
    --bg: #0a0e1a;
    --bg-light: #1a1f35;
    --surface: #252b42;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: rgba(99, 102, 241, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.2), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2), transparent 50%);
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    animation: fadeIn 1s ease forwards, moveGradient 20s ease infinite;
}

[data-theme="light"] body::before {
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.12), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.12), transparent 50%);
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes moveGradient {
    0%, 100% {
        background-position: 0% 50%;
        background-size: 200% 200%;
    }
    50% {
        background-position: 100% 50%;
        background-size: 200% 200%;
    }
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar {
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e2e8f0 !important;
}

.logo img {
    height: 32px;
    width: 32px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo img {
        height: 28px;
        width: 28px;
    }
    
    .nav-links {
        gap: 0.75rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .theme-toggle {
        width: 52px;
        height: 28px;
    }
    
    .theme-slider {
        width: 20px;
        height: 20px;
    }
    
    [data-theme="light"] .theme-slider {
        transform: translateX(24px);
    }
}

@media (max-width: 480px) {
    .nav-links a:not(:last-of-type) {
        display: none;
    }
    
    .web-app-btn {
        display: none;
    }
}

.nav-links a {
    color: #e2e8f0 !important;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #a5b4fc !important;
}

.web-app-btn {
    position: relative;
}

.web-app-btn::after {
    content: '🌐';
    margin-left: 4px;
}

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 60px;
    height: 32px;
    display: flex;
    align-items: center;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.theme-toggle:hover {
    border-color: var(--primary);
}

.theme-slider {
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .theme-slider {
    transform: translateX(28px);
}

.theme-icon {
    font-size: 0.9rem;
}

/* Hero */
.hero {
    padding: 150px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 40px;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
    }
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
}

/* Phone Mockup */
.phone-mockup {
    width: 300px;
    height: 600px;
    background: var(--surface);
    border-radius: 40px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .phone-mockup {
        width: min(280px, 80vw);
        height: min(560px, 160vw);
    }
}

@media (max-width: 480px) {
    .phone-mockup {
        width: min(260px, 85vw);
        height: min(520px, 170vw);
    }
}

.screen {
    width: 100%;
    height: 100%;
    background: var(--bg);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.camera-notch {
    position: absolute;
    top: 14px;
    left: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #000;
    z-index: 10;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px 8px 40px;
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 500;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

.signal-icon {
    display: inline-flex;
    align-items: flex-end;
    gap: 1px;
    height: 10px;
}

.signal-bar {
    width: 2px;
    background: var(--text);
    border-radius: 1px;
}

.signal-bar:nth-child(1) { height: 3px; }
.signal-bar:nth-child(2) { height: 5px; }
.signal-bar:nth-child(3) { height: 7px; }
.signal-bar:nth-child(4) { height: 9px; }

.wifi-icon {
    position: relative;
    width: 14px;
    height: 11px;
    display: inline-block;
}

.wifi-arc {
    position: absolute;
    border: 1.5px solid var(--text);
    border-radius: 50%;
    border-right: none;
    border-bottom: none;
    border-left: none;
}

.wifi-arc:nth-child(1) {
    width: 14px;
    height: 10px;
    bottom: 0;
    left: 0;
}

.wifi-arc:nth-child(2) {
    width: 10px;
    height: 7px;
    bottom: 0;
    left: 2px;
}

.wifi-arc:nth-child(3) {
    width: 6px;
    height: 4px;
    bottom: 0;
    left: 4px;
}

.wifi-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--text);
    border-radius: 50%;
    bottom: 0;
    left: 6px;
}

.battery-icon {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.battery-body {
    width: 16px;
    height: 8px;
    border: 1.5px solid var(--text);
    border-radius: 2px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 1px;
}

.battery-fill {
    width: 70%;
    height: 100%;
    background: var(--text);
    border-radius: 1px;
}

.battery-tip {
    width: 2px;
    height: 4px;
    background: var(--text);
    border-radius: 0 1px 1px 0;
}

.chat-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 16px 16px;
    overflow-y: auto;
}

.chat-preview::-webkit-scrollbar {
    width: 4px;
}

.chat-preview::-webkit-scrollbar-track {
    background: transparent;
}

.chat-preview::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

.chat-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.chat-preview {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.message {
    padding: 10px 14px;
    border-radius: 20px;
    max-width: 75%;
    font-size: 0.85rem;
    line-height: 1.4;
    animation: slideIn 0.5s ease;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 6px;
}

.message > span:first-child {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 150px;
    flex: 1 1 auto;
}

.message.received {
    background: var(--surface);
    align-self: flex-start;
}

.message.sent {
    background: linear-gradient(135deg, #7c7ff1, #6366f1);
    align-self: flex-end;
    flex-direction: row-reverse;
    color: #ffffff;
}

.message.sent .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message-time {
    font-size: 0.65rem;
    opacity: 0.7;
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
    align-self: flex-end;
}

.chat-input-bar {
    padding: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.input-container {
    flex: 1;
    background: var(--surface);
    border-radius: 24px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    min-width: 0;
    overflow: hidden;
}

.input-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: text;
    user-select: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.input-text:focus {
    color: var(--text);
}

.input-text:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
}

.send-button {
    min-width: 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-button:hover {
    transform: scale(1.1);
}

.send-button:active {
    transform: scale(0.95);
}

.input-container.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

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

/* Features */
.features {
    padding: 100px 0;
    background: var(--bg-light);
}

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

@media (max-width: 768px) {
    .features {
        padding: 60px 0;
    }
    
    .features h2 {
        font-size: 2rem;
    }
}

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

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

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

.feature-card p {
    color: var(--text-muted);
}

/* Download */
.download {
    padding: 100px 0;
}

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

@media (max-width: 768px) {
    .download {
        padding: 60px 0;
    }
    
    .download h2 {
        font-size: 2rem;
    }
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.download-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.platform-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.download-card h3 {
    margin-bottom: 0.5rem;
}

.download-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-download {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-disabled {
    background: #374151;
    color: #6b7280;
    width: 100%;
    cursor: not-allowed;
}

/* Stats Section */
.stats {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .stats {
        padding: 60px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background: var(--bg);
}

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

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    padding: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 1.5rem 1.5rem;
}

@media (max-width: 768px) {
    .faq {
        padding: 60px 0;
    }
    
    .faq h2 {
        font-size: 2rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1.25rem;
    }
}

/* Matrix Section */
.matrix {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    text-align: center;
}

.matrix h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.matrix p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.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: var(--primary);
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-section p {
    color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

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

/* Screenshots */
.screenshots {
    padding: 80px 0;
    background: var(--bg);
}

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

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.screenshot-desktop {
    grid-column: span 2;
}

.screenshot-mobile {
    grid-column: span 1;
    max-width: 300px;
    margin: 0 auto;
}

.screenshots-grid picture {
    display: block;
}

.screenshot-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.screenshot-img:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .screenshot-img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .screenshot-img:hover {
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
}

/* Modal */
.screenshot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.screenshot-modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    animation: zoomIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

@media (min-width: 769px) {
    .modal-content {
        max-width: 1200px;
    }
}

@media (max-width: 768px) {
    .modal-img {
        border-radius: 12px;
    }
    
    .modal-close {
        top: -50px;
        right: 10px;
    }
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s;
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1200px) {
    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .screenshot-desktop {
        grid-column: span 3;
    }
    
    .screenshot-mobile {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .screenshots {
        padding: 60px 0;
    }
    
    .screenshots h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .screenshot-desktop {
        grid-column: span 2;
    }
    
    .screenshot-mobile {
        grid-column: span 1;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-desktop,
    .screenshot-mobile {
        grid-column: span 1;
    }
}
