:root {
    --background-color: #ffffff;
    --text-color: #333333;
    --primary-color: #0088cc; /* A slightly darker techy blue */
    --secondary-color: #8e94b2; /* Lighter muted purple/grey */
    --card-background: #f8f9fa;
    --border-color: #d1d5e3;
    --header-background: #001e3e;
    --button-background: var(--primary-color);
    --button-text: #ffffff;
    --button-hover-background: #006699;
    --code-background: #f5f7fa;
    --code-text: #0066cc;
    --link-color: var(--primary-color);
    --link-hover-color: var(--button-hover-background);
}

body {
    font-family: "Montserrat", sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

header {
    background-color: var(--header-background);
    color: #fff;
    text-align: center;
    padding: 3rem 1rem 2rem 1rem;
    border-bottom: 2px solid var(--primary-color);
}

header h1 {
    font-size: 2.8rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo-icon {
    display: inline-block;
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

header .subtitle {
    font-size: 1.2rem;
    color: #aa5;
    margin-bottom: 1rem;
    font-weight: 300;
}

header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

header strong {
    color: #222;
}

main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.1);
}

section h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

#what-is-it p,
#what-is-it li {
    text-align: justify;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5em;
    position: relative;
}

ul li::before {
    content: "▹"; /* Using a simple arrow */
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    background-color: #eef2f7; /* Slightly darker inner cards */
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    overflow: hidden;
}

.feature-item-header {
    height: 200px;
    background-image: url("images/OCRScanner.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border-color);
}

.feature-item-content {
    padding: 1.5rem;
}

/* Unique feature header background images */
.feature-item-header.local-storage {
    background-image: url("images/localStorage.png");
}

.feature-item-header.ai-connectivity {
    background-image: url("images/200Connections.png");
}

.feature-item-header.ocr-scanner {
    background-image: url("images/OCRScanner.png");
}

.feature-item-header.prompt-engineer {
    background-image: url("images/PromptEngineer.png");
}

.feature-item-header.token-awareness {
    background-image: url("images/TokenCosts.png");
}

.feature-item-header.cross-platform {
    background-image: url("images/CrossPlatform.png");
}

.feature-item-header.model-intelligence {
    background-image: url("images/ModelIntelligence.png");
}

.feature-item-header.save-export {
    background-image: url("images/SaveExport.png");
}

.feature-item-header.multithread-engine {
    background-image: url("images/MultiThreadEngine.png");
}

.feature-item-header.crime-investigator {
    background-image: url("images/AiInvestigator.png");
}

.feature-item-header.professional-coaching {
    background-image: url("images/ProCoaching.png");
}

.feature-item-header.uncensored-ai {
    background-image: url("images/200Connections.png");
}

.feature-item-header.tor-integration {
    background-image: url("images/TorSupport.png");
}

.feature-item-header.crypto-payments {
    background-image: url("images/CryptoDebit.png");
}

.feature-item:hover .feature-item-content {
    background-color: #e6eef7;
}

.feature-item h4 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-item h4 .privacy-icon {
    color: #e6a700; /* Darker yellow for privacy related icons */
}

.feature-item p:not(.read-more-link) {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: #555;
    text-align: justify;
}

#example pre {
    background-color: var(--code-background);
    color: var(--code-text);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

#example code {
    font-family: "Courier New", Courier, monospace;
}

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

.screenshot-gallery figure {
    margin: 0;
    text-align: center;
}

.screenshot-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.screenshot-gallery img:hover {
    transform: scale(1.03);
}

.screenshot-gallery figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

.screenshot-container {
    text-align: center;
    margin: 2rem 0;
}

.screenshot-container img {
    max-width: 60%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.screenshot-container img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.15);
}

/* Video container styling */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
}

.video-container iframe {
    width: 100%;
    height: 450px;
    max-height: 60vh;
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.video-container iframe:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.15);
}

#download {
    text-align: center;
    background-color: #fffacd; /* Light yellow */
    animation: subtlePulse 4s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%,
    100% {
        background-color: #fffacd; /* Light yellow */
    }
    50% {
        background-color: #fff9c0; /* Slightly brighter yellow */
    }
}

.qr-code-container {
    text-align: center;
    margin: 2rem 0;
}

.qr-code-image {
    max-width: 200px;
    border: 4px solid #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.telegram-link {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

#download .small-text {
    font-size: 0.9rem;
    color: #777;
    margin-top: 0.5rem;
}

footer {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid var(--secondary-color);
}

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

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: #222;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    header h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 1.5rem;
        border: none; /* Remove borders on tablets and smaller */
        box-shadow: none; /* Remove shadow on tablets and smaller */
    }
    .feature-grid {
        grid-template-columns: 1fr; /* Stack features on smaller screens */
    }
    .screenshot-gallery {
        grid-template-columns: 1fr; /* Stack screenshots */
    }

    /* Video responsive adjustments */
    .video-container iframe {
        height: 280px;
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    header h2 {
        font-size: 1.3rem;
    }
    header p {
        font-size: 1rem;
    }

    section {
        padding: 1rem; /* Reduce padding further on mobile */
        margin-bottom: 1rem; /* Reduce margin between sections */
        border: none; /* Ensure no borders on mobile */
        box-shadow: none; /* Ensure no shadow on mobile */
    }

    section h3 {
        font-size: 1.5rem;
    }

    /* Video responsive adjustments for mobile */
    .video-container {
        margin: 1rem auto;
    }

    .video-container iframe {
        height: 200px;
        max-height: 40vh;
    }
}

/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    position: relative;
    background-color: var(--card-background);
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--header-background);
    color: white;
    border-bottom: 2px solid var(--primary-color);
}

.popup-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.popup-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.popup-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

.popup-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.popup-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    text-align: justify;
}

.read-more-link {
    margin-top: 1rem;
    text-align: right;
}

.read-more-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition:
        color 0.3s ease,
        text-decoration 0.3s ease;
}

.read-more-link a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive popup styles */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        margin: 10% auto;
    }

    .popup-header {
        padding: 1rem 1.5rem;
    }

    .popup-header h3 {
        font-size: 1.3rem;
    }

    .popup-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 98%;
        margin: 5% auto;
        max-height: 95vh;
    }

    .popup-header {
        padding: 0.8rem 1rem;
    }

    .popup-header h3 {
        font-size: 1.2rem;
    }

    .popup-body {
        padding: 1rem;
    }

    .popup-close {
        font-size: 1.5rem;
        width: 25px;
        height: 25px;
    }
}
