/**
 * Guide Page Styles
 * Matches the main app design system
 */

:root {
    /* Core colors */
    --bg-primary: #19254A;
    --bg-secondary: #0D1428;
    --bg-tertiary: #002186;
    --text-primary: #ffffff;
    --text-secondary: #CDE1EE;
    --text-tertiary: #9EC3DE;
    --accent: #05B2FC;
    --separator: rgba(158, 195, 222, 0.2);
    --card-radius: 16px;
}

/* Light mode */
body.light-mode {
    --bg-primary: #F5F7FA;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #E8ECF2;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-tertiary: #6a6a8a;
    --separator: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* Header */
.guide-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--separator);
    backdrop-filter: blur(10px);
    max-width: 900px;
    margin: 0 auto;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    flex-shrink: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle,
.lang-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--separator);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.theme-toggle:hover,
.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-icon-dark {
    display: block;
}

.theme-icon-light {
    display: none;
}

body.light-mode .theme-icon-dark {
    display: none;
}

body.light-mode .theme-icon-light {
    display: block;
}

.lang-toggle {
    font-size: 13px;
    font-weight: 600;
    padding: 0 12px;
    width: auto;
    min-width: 36px;
}

/* Main Content */
.guide-content {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* Hero Section */
.guide-hero {
    padding: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-badge {
    font-size: 20px;
    font-weight: 600;
    color: var(--section-text-color);
    text-transform: none;
    letter-spacing: 0;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--section-text-color);
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.85;
    color: var(--section-text-color);
}

/* Sections */
.guide-section {
    padding: 0 24px;
    margin-bottom: 48px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.step-card {
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    padding: 24px;
    border: 1px solid var(--separator);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease;
    scroll-margin-top: 80px;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Highlight targeted step */
.step-card:target {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(5, 178, 252, 0.2);
    animation: pulse-highlight 2s ease-out;
}

@keyframes pulse-highlight {
    0% {
        box-shadow: 0 0 0 3px rgba(5, 178, 252, 0.4);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(5, 178, 252, 0.1);
    }
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.screenshot-placeholder {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed var(--separator);
}

.screenshot-placeholder span {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Info Card */
.info-card {
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    padding: 24px;
    border: 1px solid var(--separator);
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.info-label {
    font-size: 14px;
    color: var(--text-tertiary);
    min-width: 100px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.section-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--separator);
}

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

.feature-card {
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    padding: 24px;
    border: 1px solid var(--separator);
    transition: transform 0.2s ease;
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(5, 178, 252, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tip-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    border: 1px solid var(--separator);
}

.tip-icon {
    width: 40px;
    height: 40px;
    background: rgba(5, 178, 252, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.tip-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.tip-content p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--card-radius);
    border: 1px solid var(--separator);
    overflow: hidden;
}

.faq-item summary {
    padding: 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    transition: background 0.15s ease;
}

.faq-item summary:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 20px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA */
.guide-cta {
    padding: 40px 24px;
    text-align: center;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-button svg {
    transition: transform 0.15s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* Footer */
.guide-footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--separator);
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .guide-header {
        padding: 12px 16px;
    }

    .back-link span {
        display: none;
    }

    .guide-hero {
        height: 48px;
    }

    .hero-badge {
        font-size: 18px;
    }

    .guide-section {
        padding: 0 16px;
        margin-bottom: 32px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

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

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

    .tip-item {
        flex-direction: column;
        gap: 12px;
    }

    .tip-icon {
        width: 36px;
        height: 36px;
    }

    .faq-item summary {
        padding: 16px;
        font-size: 14px;
    }

    .faq-item p {
        padding: 0 16px 16px;
        font-size: 13px;
    }

    .cta-button {
        padding: 14px 28px;
        font-size: 15px;
    }
}

/* Print Styles */
@media print {
    .guide-header,
    .guide-cta,
    .screenshot-placeholder {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .guide-hero {
        background: #f0f0f0 !important;
    }

    .hero-badge,
    .hero-title,
    .hero-subtitle {
        color: black !important;
    }
}
