/* Global Styles */
:root {
    /* Base Colors - shared */
    --primary-color: #3b82f6; /* Blue 500 */
    --primary-hover: #2563eb; /* Blue 600 */
    --transition: all 0.3s ease;

    /* Dark Mode (Default) */
    --bg-body: #0f172a; /* Slate 900 */
    --bg-card: #1e293b; /* Slate 800 */
    --bg-section-alt: #131c31; /* Slightly darker/different shade */
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --border-color: #334155; /* Slate 700 */
    --header-bg: rgba(15, 23, 42, 0.9);
    --shadow-card: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-body: #f8fafc; /* Slate 50 */
    --bg-card: #ffffff; /* White */
    --bg-section-alt: #f1f5f9; /* Slate 100 */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    --header-bg: rgba(255, 255, 255, 0.9);
    --shadow-card: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    gap: 0.5rem;
    border: none;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: background-color 0.3s, border-color 0.3s;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.logo img {
    height: 40px;
}

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

.nav-list a {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-list a:hover {
    color: var(--text-main);
}

.nav-list a.btn {
    color: white;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    background-color: var(--bg-card);
    z-index: 1001;
    transition: var(--transition);
    padding: 2rem;
    border-left: 1px solid var(--border-color);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-close {
    text-align: right;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu ul a {
    font-size: 1.2rem;
    display: block;
    color: var(--text-main);
}

/* Section General */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

/* Hero Section */
.hero {
    padding-top: 8rem; /* Space for fixed header */
    padding-bottom: 5rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

/* Light mode gradient adjustment */
[data-theme="light"] .hero::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
}

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

.hero-content h1 {
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    border-radius: 12px;
    box-shadow: 0 20px 50px var(--shadow-card);
    border: 1px solid var(--border-color);
    animation: float 6s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s;
}
.hero-image img:hover {
    transform: scale(1.02);
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1); }
    100% { transform: translateY(0px) scale(1); }
}

/* About Section */
.about {
    background-color: var(--bg-section-alt);
    transition: background-color 0.3s;
}

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

.about-item {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.about-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem auto;
}

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

.feature-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-card);
}

.feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    cursor: zoom-in;
}

.feature-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.feature-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Gallery Section */
.gallery {
    background-color: var(--bg-section-alt);
    overflow: hidden;
    transition: background-color 0.3s;
}

.gallery-track {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-card);
}

.gallery-track::-webkit-scrollbar {
    height: 8px;
}

.gallery-track::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.gallery-track::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.gallery-item {
    flex: 0 0 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px var(--shadow-card);
    border: 1px solid var(--border-color);
    cursor: zoom-in;
}
.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s;
}
.gallery-item:hover img {
    transform: scale(1.05);
}

/* Video Section */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow-card);
    border: 1px solid var(--border-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Download Section */
.download-section {
    padding: 6rem 0;
}

.download-box {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-body) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .download-box {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.download-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.download-actions {
    margin: 2rem 0;
}

.download-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

.github-link {
    margin-top: 1.5rem;
}

.github-link a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Footer */
.footer {
    background-color: var(--bg-section-alt);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 30px;
    filter: grayscale(100%);
    opacity: 0.7;
}

.footer-logo h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-muted);
}

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

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.5rem;
}

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

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

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    object-fit: contain;
}

#lightbox-caption {
    margin: 20px auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #f8fafc;
    font-size: 1.1rem;
    padding: 10px 0;
}

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

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

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

/* Responsive */
@media (max-width: 992px) {
    .h1 {
        font-size: 2rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }
    
    .hero-btns {
        justify-content: center;
    }

    .gallery-item {
        flex: 0 0 400px;
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-content {
        order: 1;
    }

    .gallery-item {
        flex: 0 0 300px;
    }
    
    .lightbox-content {
        width: 100%;
    }
}
