/* Global Reset & Base Styles */
:root {
    --bg-color: #0d0d0d;
    --text-color: #e0e0e0;
    --accent-color: #d4af37;
    /* Gold-ish */
    --accent-light: #f3e5ab;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --sidebar-width: 400px;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Bradley Hand', 'Chalkboard SE', cursive;
}

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

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

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

a:hover {
    color: var(--accent-light);
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: normal;
    margin-bottom: 1rem;
    color: #fff;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: 1px;
}

h2 {
    font-size: 2.2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    display: inline-block;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #cccccc;
}

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

section {
    padding: 80px 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    position: relative;
    padding-top: 100px;
}

.hero-content {
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    animation: fadeIn 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tagline {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-family: var(--font-primary);
    font-weight: 300;
    max-width: 800px;
}

.hero-image-container {
    margin: 40px auto 0;
    position: relative;
    width: 80%;
    max-width: 1000px;
    aspect-ratio: 16/10;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    color: #555;
    font-size: 0.9em;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* or cover, depending on screenshot */
}

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

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Privacy Section */
.privacy-excerpt {
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color);
    color: #000;
    font-weight: 600;
    border-radius: 30px;
    margin-top: 20px;
    font-family: var(--font-primary);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.button:hover {
    background: var(--accent-light);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Contact Section */
#contact {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-color);
    font-weight: 500;
}

input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.contact-form button {
    width: 100%;
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive and Device Customization */
.responsive-screenshot {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: #000;
    border: 1px solid var(--glass-border);
}

.responsive-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Hide/show based on device detection or screen size */
.responsive-screenshot .img-iphone {
    display: none;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 24px;
    border: 4px solid #1a1a1a;
}

.responsive-screenshot .img-ipad {
    display: block;
    border-radius: 12px;
}

/* Width-based media query (fallback for no-JS) */
@media (max-width: 767px) {
    html:not(.device-desktop):not(.device-ipad) .responsive-screenshot .img-iphone {
        display: block;
    }
    html:not(.device-desktop):not(.device-ipad) .responsive-screenshot .img-ipad {
        display: none;
    }
}

/* Strict User-Agent Overrides */
html.device-iphone .responsive-screenshot .img-iphone {
    display: block !important;
}
html.device-iphone .responsive-screenshot .img-ipad {
    display: none !important;
}

html.device-ipad .responsive-screenshot .img-iphone {
    display: none !important;
}
html.device-ipad .responsive-screenshot .img-ipad {
    display: block !important;
}

html.device-desktop .responsive-screenshot .img-iphone {
    display: none !important;
}
html.device-desktop .responsive-screenshot .img-ipad {
    display: block !important;
}

/* Base Responsive rules */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero {
        padding-top: 60px;
    }
}

/* Manual & Guide Layout Styles */
.manual-nav {
    padding: 20px 0;
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.back-link:before {
    content: '←';
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.back-link:hover:before {
    transform: translateX(-5px);
}

.guide-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
    margin-top: 40px;
}

.toc {
    position: sticky;
    top: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.toc h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin-bottom: 16px;
    font-family: var(--font-primary);
    font-weight: 600;
}

.toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    font-size: 0.95rem;
    color: #aaa;
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--accent-color);
}

.manual-section {
    margin-bottom: 100px;
    scroll-margin-top: 40px;
}

.manual-desc {
    max-width: 800px;
    margin-bottom: 30px;
}

/* Badges and elements for guides */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent-color);
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.step-row p {
    margin-bottom: 0;
}

.info-box {
    background: rgba(212, 175, 55, 0.08);
    border-left: 3px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 24px 0;
}

.info-box p {
    margin-bottom: 0;
    color: #d0d0d0;
    font-size: 0.95rem;
}

.info-box strong {
    color: var(--accent-color);
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.85em;
    color: #fff;
}

/* Feature detail tables */
.theory-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.theory-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--glass-border);
}

.theory-table td {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* FAQ items */
.faq-item {
    border-bottom: 1px solid var(--glass-border);
    padding: 24px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-q {
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.faq-a {
    color: #bbb;
    margin-bottom: 0;
}

/* Stack guide sidebar on mobile */
@media (max-width: 860px) {
    .guide-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .toc {
        position: static;
    }
}