@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

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

:root {
    --primary: #5DADE2;
    --primary-dark: #2E86AB;
    --primary-light: #AED6F1;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --text-dark: #1a1a2e;
    --text-gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-bg);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 20px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s;
}

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

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

.nav-item {
    position: relative;
}

.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    padding: 12px 20px;
    border-bottom: 1px solid var(--light-bg);
}

.dropdown li:last-child {
    border-bottom: none;
}

.dropdown a {
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown .badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.qr-header {
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

.subtitle {
    color: var(--text-gray);
    font-size: 14px;
    margin-top: 4px;
}

main.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 20px;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.optional {
    color: var(--text-gray);
    font-weight: 400;
    font-size: 12px;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
}

input[type="file"] {
    width: 100%;
    padding: 10px 0;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-gray);
}

input[type="file"]::file-selector-button {
    padding: 8px 16px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: var(--white);
    color: var(--primary-dark);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 12px;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-light);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-dark);
    border: 2px solid var(--primary);
    margin-top: 20px;
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.result-area {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.result-area canvas {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

#download-wrapper {
    text-align: center;
}

footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-gray);
    font-size: 13px;
}

.seo-section {
    padding: 60px 0;
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.seo-content h2 {
    font-size: 22px;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.seo-content h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin: 25px 0 12px;
}

.seo-content p {
    color: var(--text-gray);
    font-size: 15px;
    margin-bottom: 15px;
}

.seo-content ul {
    list-style: none;
    margin-bottom: 15px;
}

.seo-content ul li {
    padding: 8px 0;
    color: var(--text-gray);
    font-size: 15px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.seo-content ul li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.seo-content ul li strong {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

/* ---------- Mobile navigation ---------- */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 110;
    touch-action: manipulation;
}

.menu-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.4);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--primary-dark);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 10px 20px 20px;
        background: var(--white);
        box-shadow: var(--shadow-hover);
        border-top: 1px solid var(--border);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        text-align: left;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
        z-index: 105;
    }

    .nav-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu > li {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid var(--light-bg);
    }

    .nav-menu > li > a {
        display: block;
        padding: 14px 0;
        font-size: 16px;
    }

    .nav-item > a {
        cursor: default;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0 0 12px 18px;
        transition: none;
    }

    .dropdown li {
        padding: 0;
        border-bottom: none;
    }

    .dropdown a {
        display: block;
        justify-content: flex-start;
        padding: 10px 0;
        font-size: 15px;
    }
}
