/* Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success-color: #16a34a;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

.page-wrapper {
    min-height: 100vh;
    position: relative;
}

/* Language Selector Styles */
.language-selector {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
}

.language-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 120px;
    box-shadow: var(--shadow-md);
}

.language-button:hover {
    background: #f3f4f6;
    border-color: var(--primary-color);
}

.language-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.2s;
}

.language-button[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    margin-top: 4px;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background-color 0.2s;
}

.language-option:hover {
    background: var(--bg-secondary);
}

.language-option.selected {
    background: var(--primary-light);
    color: var(--primary-color);
}

.language-option .language-flag {
    flex-shrink: 0;
}

/* RTL Support */
[dir="rtl"] .language-selector {
    left: 16px;
    right: auto;
}

[dir="rtl"] .language-dropdown {
    left: 0;
    right: auto;
}

[dir="rtl"] .dropdown-arrow {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .language-button,
[dir="rtl"] .language-option {
    flex-direction: row-reverse;
}

/* Navigation */
.nav-bar {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 180px 16px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
    transition: color 0.2s;
}

.logo-icon {
    font-size: 24px;
}

.nav-logo:hover {
    color: var(--primary-color);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Hero Section */
.hero {
    background: var(--bg-gradient);
    padding: 80px 24px;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
    font-weight: 400;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Guide Section */
.guide-section {
    margin-bottom: 80px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.step-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 32px;
    width: 48px;
    height: 48px;
    background: var(--bg-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}

.step-icon {
    font-size: 48px;
    margin: 24px 0 16px;
}

.step-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.step-tip {
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 12px 16px;
    border-radius: var(--radius);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    color: #92400e;
}

.tip-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Screenshots Section */
.screenshots-section {
    margin-bottom: 80px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.screenshot-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.screenshot-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.screenshot-caption {
    padding: 20px;
}

.screenshot-caption h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

/* Benefits Section */
.benefits-section {
    margin-bottom: 80px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.benefit-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.benefit-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.benefit-card.highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--primary-color);
}

.benefit-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.benefit-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.benefit-example {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-primary);
}

.benefit-example strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

/* Help Section */
.help-section {
    margin-bottom: 80px;
}

.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.help-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}

.help-card:hover {
    transform: translateY(-4px);
}

.help-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.help-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.help-card ul {
    list-style: none;
    padding: 0;
}

.help-card li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
    font-size: 18px;
}

/* Download Section */
.download-section {
    background: var(--bg-gradient);
    border-radius: var(--radius-xl);
    padding: 60px 32px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.download-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.download-content p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 32px;
}

.app-badges {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.app-badge {
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-block;
}

.app-badge:hover {
    transform: translateY(-4px);
    filter: brightness(1.1);
}

.app-badge img {
    height: 60px;
    width: auto;
    display: block;
}

.web-scanner-link {
    margin-top: 20px;
    font-size: 16px;
}

.web-scanner-link a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.web-scanner-link a:hover {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-selector {
        top: 12px;
        right: 12px;
    }

    .language-button {
        min-width: 100px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .language-flag {
        width: 18px;
        height: 13px;
    }

    .nav-container {
        padding: 12px 120px 12px 16px;
    }

    .hero {
        padding: 60px 24px;
    }

    .hero-title {
        font-size: 36px;
    }

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

    .main-content {
        padding: 40px 20px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-description {
        font-size: 16px;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .help-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .download-content h2 {
        font-size: 28px;
    }

    .download-content p {
        font-size: 16px;
    }

    .app-badges {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .language-button {
        min-width: 90px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .nav-container {
        padding: 12px 100px 12px 12px;
        gap: 16px;
    }

    .nav-logo {
        font-size: 16px;
    }

    .logo-icon {
        font-size: 20px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .step-card {
        padding: 24px;
    }

    .benefit-card {
        padding: 20px;
    }

    .help-card {
        padding: 24px;
    }
}

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

.guide-section,
.screenshots-section,
.benefits-section,
.help-section {
    animation: fadeInUp 0.6s ease-out;
}
