/* General Styles & Variables */
:root {
    --primary: #c93d73;
    --primary-dark: #a82d5e;
    --secondary: #6a4299;
    --light: #ffebf3;
    --dark: #1a1428;
    --text: #1a1a2e;
    --text-light: #555566;
    --background: #fcf8ff;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(255, 107, 157, 0.1);
    --focus-outline: 2px solid #c93d73;
}

[data-theme="dark"] {
    --primary: #ff7eb3;
    --primary-dark: #ff6b9d;
    --secondary: #a88de0;
    --light: #2a2a45;
    --dark: #0d0d18;
    --text: #f5f5f5;
    --text-light: #c5c5c5;
    --background: #1a1a2e;
    --card-bg: #212134;
    --shadow: 0 4px 20px rgba(143, 104, 201, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Font loading optimization */
@font-face {
    font-family: 'Segoe UI';
    font-display: swap;
}

/* Accessibility: Focus styles */
*:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: white;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.add-btn {
    background-color: white;
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 2px 0;
    border-radius: 3px;
    transition: 0.4s;
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    background: linear-gradient(135deg, #ff6b9d 0%, #8f68c9 50%, #6a4299 100%);
    position: relative;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* General Section Styling */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-title p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

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

.feature-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--primary-dark);
}

/* Commands Section */
.commands {
    background-color: var(--light);
}

.command-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 10px;
}

.command-tab {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    background-color: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-weight: 500;
}

.command-tab.active, .command-tab:hover {
    background-color: var(--primary);
    color: white;
}

.command-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.command-group {
    display: none;
}

.command-group.active {
    display: block;
}

.command {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--light);
}

.command:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.command-name {
    font-family: 'Courier New', monospace;
    background-color: var(--dark);
    color: #f1f1f1;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-right: 10px;
    display: inline-block;
}

.command h3 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: var(--text);
    flex-wrap: wrap;
    font-size: 1.1rem;
}

.command h4 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: var(--text);
    flex-wrap: wrap;
}

/* Screenshots Section */
.screenshots {
    text-align: center;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.screenshot {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 200px; /* Or a fixed height that works for your design */
}

.screenshot:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.2);
}

.screenshot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* This makes images cover the area without distortion */
    object-position: top; /* You can adjust this (top, center, bottom) */
}


/* Setup Section */
.setup-steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    margin-bottom: 40px;
    gap: 20px;
    align-items: flex-start;
}

.step:last-child {
    margin-bottom: 0;
}

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

.step-content h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.code-block {
    background-color: var(--dark);
    color: #f1f1f1;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 15px 0;
    overflow-x: auto;
    white-space: pre;
}

/* Legal Pages (Terms & Privacy) Styling */
.legal-page {
    padding-top: 120px;
    padding-bottom: 80px;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.legal-page header {
    text-align: center;
    margin-bottom: 40px;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
}

.legal-page header h1 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.legal-page header .last-updated {
    color: var(--text-light);
    font-style: italic;
}

.legal-page h2 {
    color: var(--primary-dark);
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light);
}

.legal-page h3 {
    color: var(--secondary);
    margin-top: 20px;
    margin-bottom: 10px;
}

.legal-page p,
.legal-page ul,
.legal-page ol {
    margin-bottom: 15px;
}

.legal-page ul,
.legal-page ol {
    padding-left: 20px;
}

.legal-page li {
    margin-bottom: 8px;
}

.legal-page a {
    color: var(--secondary);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

.highlight-box {
    background-color: var(--light);
    border-left: 4px solid var(--primary);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}


/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* UI Elements: Modals, Toggles, etc. */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-3px);
}

[data-theme="dark"] .theme-toggle {
    background-color: var(--secondary);
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.image-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.image-modal img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-modal.active img {
    transform: scale(1);
}

/* Responsive Styles */
@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        flex-direction: column;
        background-color: var(--primary);
        width: 70%;
        height: 100vh;
        padding: 80px 40px 40px;
        transition: right 0.5s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        gap: 1.5rem;
        align-items: flex-start;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001; /* Ensure it's above the nav panel */
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -5px);
    }

    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2, .legal-page header h1 {
        font-size: 2rem;
    }

    .feature-card, .legal-container {
        padding: 20px;
    }

    .step {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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