:root {
    --bg-dark: #0a0a0c;
    --accent-purple: #8c25f4;
    --accent-purple-light: #a855f7;
    --glass-bg: rgba(140, 37, 244, 0.05);
    --glass-border: rgba(140, 37, 244, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-dimmed: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background gradient effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(140, 37, 244, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(140, 37, 244, 0.08), transparent);
    pointer-events: none;
    z-index: -1;
}

#landing-page {
    display: block;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '#';
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.logo-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 100;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: var(--bg-dark);
    border-left: 1px solid var(--glass-border);
    z-index: 95;
    padding: 100px 32px 32px;
    transition: right 0.3s ease;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-links a:hover {
    color: var(--text-primary);
}

.mobile-sign-in-btn {
    margin-top: 24px;
    padding: 14px 24px;
    background: var(--accent-purple);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.mobile-sign-in-btn:hover {
    background: var(--accent-purple-light);
    box-shadow: 0 0 20px rgba(140, 37, 244, 0.4);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 24px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 .accent {
    color: var(--accent-purple);
    text-shadow: 0 0 40px rgba(140, 37, 244, 0.5);
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background: var(--accent-purple);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(140, 37, 244, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(140, 37, 244, 0.6);
    background: var(--accent-purple-light);
}

.cta-button svg {
    width: 20px;
    height: 20px;
}

.cta-subtext {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-dimmed);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cta-subtext svg {
    width: 12px;
    height: 12px;
}

/* Magic Link Mockup */
.magic-link-section {
    padding: 60px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
    opacity: 0.5;
}

.browser-mockup {
    background: rgba(20, 20, 24, 0.8);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-dot:nth-child(1) {
    background: #ff5f57;
}

.browser-dot:nth-child(2) {
    background: #febc2e;
}

.browser-dot:nth-child(3) {
    background: #28c840;
}

.browser-url {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--text-dimmed);
    font-family: 'Space Grotesk', sans-serif;
}

.hash-display {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hash-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent-purple-light);
    letter-spacing: 1px;
    background: rgba(140, 37, 244, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(140, 37, 244, 0.2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.copy-icon {
    padding: 12px;
    background: var(--accent-purple);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-icon:hover {
    background: var(--accent-purple-light);
    transform: scale(1.05);
}

.copy-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.magic-caption {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Feature Grid */
.features-section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
}

/* Workflow Section */
.workflow-section {
    padding: 80px 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.workflow-title {
    text-align: center;
    font-size: 14px;
    color: var(--text-dimmed);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 48px;
}

.workflow-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    padding: 0 40px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-purple);
}

.step-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.step-content {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 200px;
    font-weight: 300;
}

.step-arrow {
    font-size: 24px;
    color: var(--accent-purple);
    opacity: 0.5;
    margin-top: -30px;
}

/* Footer */
footer {
    padding: 40px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-dimmed);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

.copyright {
    color: var(--text-dimmed);
    font-size: 13px;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .mobile-menu-overlay {
        display: block;
    }

    .mobile-nav {
        display: block;
    }

    nav {
        padding: 20px 24px;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .workflow-steps {
        flex-direction: column;
        gap: 24px;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ==================== CHAT PAGE STYLES ==================== */

/* Chat Page Container */
#chat-page {
    margin: 0;
    padding-top: 100px;
    padding-bottom: 100px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    max-width: 100%;
    overflow: hidden;
    min-height: 100vh;
}

/* Chat Navigation Bar */
.chat-nav {
    width: 90%;
    top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(41, 41, 41, 0.075);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    position: fixed;
    flex-shrink: 0;
    z-index: 100;
}

.chat-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.chat-logo .logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chat-logo .logo-icon::before {
    content: '#';
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(140, 37, 244, 0.15);
    padding: 8px 16px;
    border-radius: 24px;
    border: 1px solid rgba(140, 37, 244, 0.3);
}

.chat-status svg {
    width: 14px;
    height: 14px;
    color: var(--accent-purple);
}

.chat-status span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.copy-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(141, 37, 244, 0.342);
    color: var(--accent-purple);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(141, 37, 244, 0.589);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.copy-link-btn:hover {
    background: rgba(140, 37, 244, 0.3);
    box-shadow: 0 0 15px rgba(140, 37, 244, 0.3);
}

.copy-link-btn svg {
    width: 16px;
    height: 16px;
}

/* Chat Container */
.chat-container {
    max-width: 800px;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 130px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Chat Stream */
.chat-stream {
    padding: 35px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    /* min-width: 300px; */
    width: 100%;
    margin: 0 auto;
}

/* Message Styles */
.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%;
}

.message.incoming {
    align-self: flex-start;
    align-items: flex-start;
}

.message.outgoing {
    align-self: flex-end;
    align-items: flex-end;
}

.message-time {
    font-size: 10px;
    color: var(--text-dimmed);
    margin-bottom: 4px;
    padding: 0 4px;
}

.message-bubble {
    border-radius: 18px;
    max-width: 75%; 
    width: fit-content; 
    padding: 10px 16px; 
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word; 
    overflow-wrap: break-word;
}

.message.incoming .message-bubble {
    background: #1c1c24;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message.outgoing .message-bubble {
    background: var(--accent-purple);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(140, 37, 244, 0.3);
}

/* Input Area */
.input-area {
    margin: 20px 0;
    position: fixed;
    /* width: ; */
    padding: 16px 24px 24px;
    background: rgba(22, 22, 29, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    bottom: 0;
    flex-shrink: 0;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(22, 22, 29, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 8px 12px;
    max-width: 800px;
    margin: 0 auto;
}

.input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    padding: 8px 4px;
}

.input-container input::placeholder {
    color: var(--text-dimmed);
}

.input-icon {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.input-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-dimmed);
}

.input-icon:hover {
    background: rgba(255, 255, 255, 0.08);
}

.input-icon:hover svg {
    color: var(--text-secondary);
}

.send-btn {
    width: 40px;
    height: 40px;
    background: var(--accent-purple);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--accent-purple-light);
    box-shadow: 0 0 15px rgba(140, 37, 244, 0.5);
    transform: scale(1.05);
}

.send-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.encryption-note {
    text-align: center;
    font-size: 11px;
    color: var(--text-dimmed);
    letter-spacing: 1px;
    margin-top: 12px;
    text-transform: uppercase;
}

/* Mobile Responsiveness for Chat Page */
@media (max-width: 768px) {
    .chat-nav {
        width: 90%;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .chat-logo {
        order: 1;
    }

    .chat-logo span {
        /* display: none; */
        font-size: 14px;
    }

    .copy-link-btn {
        order: 2;
    }

    .copy-link-btn span {
        display: none;
    }

    .copy-link-btn {
        padding: 10px;
    }

    .chat-status {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        margin-top: 4px;
    }
    
    .chat-status span {
        font-size: 13px;
    }

    .chat-container {
        padding: 16px;
        padding-bottom: 120px;
    }

    .message {
        max-width: 85%;
    }

    .message-bubble {
        font-size: 14px;
        padding: 10px 14px;
        flex-wrap: wrap;
    }

    .input-area {
        width: 90%;
        padding: 12px 16px 16px;
    }

    .input-container {
        padding: 6px 10px;
    }

    .input-container input {
        font-size: 14px;
    }

    .input-icon {
        width: 32px;
        height: 32px;
    }

    .input-icon svg {
        width: 18px;
        height: 18px;
    }

    .send-btn {
        width: 36px;
        height: 36px;
    }

    .send-btn svg {
        width: 16px;
        height: 16px;
    }

    .encryption-note {
        font-size: 10px;
    }
}

/* Extra Small Devices (below 480px) */
@media (max-width: 480px) {
    .chat-nav {
        padding: 10px 12px;
    }

    .chat-logo .logo-icon {
        width: 28px;
        height: 28px;
    }

    .chat-logo .logo-icon::before {
        font-size: 16px;
    }

    .chat-status {
        padding: 8px 10px;
    }

    .chat-status svg {
        width: 12px;
        height: 12px;
    }

    .chat-status span {
        font-size: 13px;
    }

    .copy-link-btn {
        padding: 8px;
    }

    .copy-link-btn svg {
        width: 14px;
        height: 14px;
    }

    .chat-container {
        padding: 12px;
        padding-bottom: 130px;
        gap: 16px;
    }

    .message {
        max-width: 90%;
    }

    .message-time {
        font-size: 9px;
    }

    .message-bubble {
        font-size: 15px;
        padding: 8px 12px;
    }

    .input-area {
        padding: 10px 12px 14px;
    }

    .input-container {
        padding: 5px 8px;
        gap: 8px;
    }

    .input-container input {
        font-size: 13px;
        padding: 6px 2px;
    }

    .input-icon {
        width: 30px;
        height: 30px;
    }

    .input-icon svg {
        width: 16px;
        height: 16px;
    }

    .send-btn {
        width: 32px;
        height: 32px;
    }

    .send-btn svg {
        width: 14px;
        height: 14px;
    }

    .encryption-note {
        font-size: 9px;
        margin-top: 8px;
    }
}
