/* Imports for Geist Font */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap');

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

:root {
    /* VibeNVR Light Theme (Based on Screenshot) */
    --background: #F8FAFC;
    /* Slate 50 */
    --foreground: #0F172A;
    /* Slate 900 */

    --card: #FFFFFF;
    --card-foreground: #1E293B;
    /* Slate 800 */

    --primary: #3B82F6;
    /* Blue 500 */
    --primary-foreground: #FFFFFF;

    --secondary: #EFF6FF;
    /* Blue 50 */
    --secondary-foreground: #1E40AF;
    /* Blue 800 */

    --muted: #F1F5F9;
    /* Slate 100 */
    --muted-foreground: #64748B;
    /* Slate 500 */

    --border: #E2E8F0;
    /* Slate 200 */
    --input: #E2E8F0;

    --radius: 1rem;
    /* Highly rounded corners per screenshot */
    --font-sans: 'Geist', system-ui, sans-serif;
    --font-mono: 'Geist Mono', monospace;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--foreground);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--muted-foreground);
}

a {
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Dashboard often has 4 cols */

@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 640px) {

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.font-bold {
    font-weight: 700;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    /* Buttons usually less rounded than cards */
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--primary) 90%, black);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: white;
    color: var(--foreground);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

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

/* Cards (Dashboard Style) */
.card {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    /* border-color: color-mix(in srgb, var(--primary) 30%, transparent); Removed per user request */
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.card-sub {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Sidebar / Navbar (Simplified for Landing Page) */
header {
    background-color: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

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

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

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        font-size: 0.9rem;
    }
}

.logo img {
    height: 32px;
    width: auto;
}

/* Sections */
.section-title {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-title h2 {
    font-size: 2.25rem;
    color: var(--foreground);
}

.section-title p {
    font-size: 1.125rem;
}

/* Code Block */
.code-window {
    background-color: #1E293B;
    /* Slate 800 - Contrast for code */
    border-radius: var(--radius);
    padding: 1.5rem;
    color: #E2E8F0;
    font-family: var(--font-mono);
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid #334155;
}

.code-window .line {
    display: block;
    padding: 0.1rem 0;
}

.code-window .comment {
    color: #64748B;
}

.code-window .cmd {
    color: #38BDF8;
    font-weight: bold;
}

.code-window .arg {
    color: #A5B4FC;
}

.code-window .indent {
    padding-left: 1.5rem;
}

.code-window .double-indent {
    padding-left: 3rem;
}

.code-window .triple-indent {
    padding-left: 4.5rem;
}

/* Installation Steps */
.step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-number {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Footer */
footer {
    background-color: white;
    border-top: 1px solid var(--border);
    padding: 4rem 0;
    color: var(--muted-foreground);
}

/* Gallery Scroll */
.gallery-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for Chrome, Safari and Opera */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    width: 350px;
    /* Increased width per user request */
    min-width: 350px;
    flex: 0 0 350px;
    scroll-snap-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .gallery-item {
        min-width: 85vw;
        /* Responsive width for mobile */
    }
}

.gallery-wrapper {
    position: relative;
}

.gallery-nav {
    position: absolute;
    top: 100px;
    /* Aligns with the center of the 16:9 image (approx 197px height) */
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--foreground);
    transition: all 0.2s;
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
}

.gallery-nav.prev {
    left: 1rem;
}

.gallery-nav.next {
    right: 1rem;
}

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

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    /* Enforce aspect ratio */
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
    border-radius: var(--radius);
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Support Section */
#support .support-btn {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

#support a[href*="star-history.com"]:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
    #support .section-title h2 {
        font-size: 1.75rem;
    }
    
    #support .support-btn img {
        height: 50px !important;
        width: auto !important;
    }
}
