/* ============================================
   CHATAROO WEBSITE - STYLES
   A modern, polished landing page
   ============================================ */

/* CSS Variables */
:root {
    --accent: #53fc18;
    --accent-dim: #53fc1840;
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #151515;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --border: #2a2a2a;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px var(--accent-dim);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    height: 24px;
    width: auto;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

/* New: Support Link Style */
.nav-support {
    color: var(--accent) !important; /* Force accent color */
    font-weight: 600;
    font-size: 0.95rem !important;
    transition: all var(--transition);
}

.nav-support:hover {
    color: var(--text-primary) !important;
    transform: scale(1.05);
}

.nav-cta {
    background: var(--accent);
    color: #000 !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.nav-cta:hover {
    box-shadow: var(--shadow-glow);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 8rem 4rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -100px;
    opacity: 0.15;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #00ff88;
    bottom: 100px;
    left: -100px;
    opacity: 0.1;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #00ffff;
    top: 50%;
    left: 50%;
    opacity: 0.08;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-tertiary);
}

.btn-icon {
    font-size: 1.1rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

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

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
}

/* Hero App Window Mock */
.hero-image {
    position: relative;
    z-index: 1;
}

.app-window {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c940; }

.window-title {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.window-content {
    display: grid;
    grid-template-columns: 80px 1fr;
    height: 300px;
}

.mock-chat-container {
    display: flex;
    flex-direction: column;
    height: 300px;
    overflow: hidden;
}

.mock-sidebar {
    background: var(--bg-primary);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mock-channel {
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    opacity: 0.5;
}

.mock-channel.active {
    background: var(--accent);
    opacity: 1;
}

.mock-chat {
    padding: 1rem;
    padding-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.6rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.mock-input-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.mock-emote-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.mock-input-box {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.mock-send-btn {
    background: var(--accent);
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    cursor: pointer;
    color: #000;
}

.mock-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    animation: messageSlideIn 0.3s ease-out;
    flex-shrink: 0;
}

.mock-username {
    font-weight: 600;
    white-space: nowrap;
}

.mock-text {
    color: var(--text-secondary);
    word-break: break-word;
}

.mock-emote {
    height: 22px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

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

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-dim);
    box-shadow: var(--shadow-md);
}

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

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   SCREENSHOTS SECTION
   ============================================ */

.screenshots {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.screenshots-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    /* Create a balanced 3-column grid that works well for 12 items */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px;
    margin-top: 30px;
}

.screenshot-item {
    /* Apply styling to each screenshot container */
    overflow: hidden;
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: transform 0.3s var(--transition);
    cursor: pointer; /* Indicates it's clickable */
}

.screenshot-item img {
    /* Make the image fill its container */
    width: 100%;
    height: auto;
    display: block;
    /* Subtle hover to hint at interactivity */
    transition: transform 0.3s ease-in-out;
}

.screenshot-item:hover img {
    transform: scale(1.02);
}

/* Cleanup the old placeholder styling */
.screenshot-placeholder {
    display: none; /* Hide the old placeholder */
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */

.download {
    padding: 6rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.download-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.2;
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.download-content > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

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

.btn-download {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.btn-download:hover:not(.disabled) {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-download.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-download .btn-icon {
    font-size: 1.5rem;
}

.btn-text {
    text-align: left;
}

.btn-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.btn-platform {
    font-size: 1rem;
    font-weight: 600;
}

.download-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.version {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 2rem 4rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

    .download-card {
        padding: 2rem;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-download {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .screenshots-container {
        grid-template-columns: 1fr; /* Stack screenshots on top of each other on mobile */
    }
}

@media (max-width: 480px) {
    /* MODIFIED: Ensure .nav-support remains visible along with .nav-cta */
    .nav-links a:not(.nav-cta, .nav-support) {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================
   LIGHTBOX/MODAL STYLES (for screenshot preview)
   ============================================ */

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer; /* Indicates it's dismissible */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.lightbox-content img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100vh; /* Ensure it fits height-wise */
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 2rem;
    padding: 5px 15px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
}