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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Hamburger Menu */
.menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 2px 0;
    transition: 0.4s;
}

/* Hidden Navigation */
.hidden-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.hidden-nav.active {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.nav-links-vertical {
    margin-top: 60px;
}

.nav-links-vertical a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.nav-links-vertical a:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.main-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.tools-section {
    flex: 1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 30px;
    max-width: 600px;
}

.result-section {
    flex: 1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 30px;
    min-height: 600px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 8px;
    border: none;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

.tool-panel h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    font-size: 13px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 5px;
    width: auto;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.result {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    min-height: 50px;
    position: relative;
    font-size: 14px;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.qr-display {
    text-align: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
}

.qr-display img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 5px;
}

/* Loading indicator for QR code */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #667eea;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ad-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
}

.page-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none;
}

.page-content.active {
    display: block;
}

.page-content h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.page-content h3 {
    color: #4a5568;
    margin: 25px 0 15px 0;
    font-size: 1.3rem;
}

.page-content p {
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.8;
}

.page-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.page-content li {
    margin-bottom: 10px;
    color: #4a5568;
}

.contact-form {
    max-width: 600px;
    margin: 30px 0;
}

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

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
}

.form-row textarea {
    height: 150px;
    resize: vertical;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.feature-card h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.seo-section {
    margin: 36px 0;
}

.seo-section h2 {
    color: #2d3748;
    margin-bottom: 16px;
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

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

.landing-grid,
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.landing-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.landing-card strong {
    display: block;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.landing-card span {
    color: #4a5568;
    font-size: 0.95rem;
}

.faq-grid details {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
}

.faq-grid summary {
    cursor: pointer;
    color: #2d3748;
    font-weight: 700;
}

.faq-grid p {
    margin: 10px 0 0;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 50px;
    opacity: 0.8;
    font-size: 14px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Blog Styles */
.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.blog-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.blog-card-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.blog-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 15px;
}

.blog-card-excerpt {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.blog-tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-article {
    max-width: 800px;
    margin: 0 auto;
}

.back-to-blog {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 30px;
    transition: background 0.3s ease;
}

.back-to-blog:hover {
    background: #5a67d8;
}

.blog-meta {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 0.9rem;
    color: #4a5568;
    border-left: 4px solid #667eea;
}

.share-buttons {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
}

.share-btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 16px;
    margin: 5px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.share-btn:hover {
    background: #5a67d8;
}

.blog-article h1 {
    color: #2d3748;
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.blog-article h2 {
    color: #4a5568;
    font-size: 1.6rem;
    margin: 30px 0 15px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.blog-article h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin: 25px 0 12px 0;
}

.blog-article p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
}

.blog-article ul, .blog-article ol {
    margin: 15px 0 15px 20px;
}

.blog-article li {
    color: #4a5568;
    margin-bottom: 8px;
    line-height: 1.6;
}

.blog-article code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e53e3e;
}

.blog-article blockquote {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: #4a5568;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .tools-section {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .tab-btn {
        min-width: 100px;
        font-size: 11px;
        padding: 10px 5px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Global site chrome ---------- */
.site-nav {
    background: rgba(255,255,255,0.96);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin-bottom: 24px;
}

.site-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3748;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-logo span { color: #667eea; }

.site-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.site-nav-links a {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav-links a:hover { background: #eef1fb; color: #534ab7; }
.site-nav-links a.is-current { background: #eef1fb; color: #534ab7; }

.breadcrumb {
    font-size: 13px;
    color: #718096;
    margin-bottom: 18px;
}

.breadcrumb a { color: #534ab7; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.site-footer {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 14px;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 14px;
}

.site-footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.92;
}

.site-footer-links a:hover { text-decoration: underline; }
.site-footer p { opacity: 0.85; margin-bottom: 6px; }

/* ---------- Long-form content ---------- */
.article-body h2 {
    color: #2d3748;
    font-size: 1.5rem;
    margin: 34px 0 14px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.article-body h3 {
    color: #4a5568;
    font-size: 1.18rem;
    margin: 26px 0 10px;
}

.article-body p { color: #4a5568; line-height: 1.85; margin-bottom: 15px; }

.article-body ul, .article-body ol { margin: 0 0 18px 22px; }
.article-body li { color: #4a5568; line-height: 1.8; margin-bottom: 8px; }
.article-body strong { color: #2d3748; }

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
}

.article-body th, .article-body td {
    border: 1px solid #e2e8f0;
    padding: 9px 12px;
    text-align: left;
    color: #4a5568;
}

.article-body th { background: #f7fafc; color: #2d3748; }

.notice {
    background: #fffaf0;
    border-left: 4px solid #dd9b28;
    padding: 14px 18px;
    border-radius: 6px;
    margin: 20px 0;
    color: #6b4e10;
    font-size: 14px;
    line-height: 1.7;
}

.toc {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0 30px;
}

.toc strong { display: block; margin-bottom: 8px; color: #2d3748; }
.toc ol { margin: 0 0 0 20px; }
.toc li { margin-bottom: 5px; }
.toc a { color: #534ab7; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Cookie consent ---------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: #2d3748;
    color: #fff;
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    display: none;
}

.cookie-banner.is-visible { display: block; }

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-inner a { color: #b5d4f4; text-decoration: underline; }

.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cookie-btn {
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.cookie-btn.accept { background: #667eea; color: #fff; }
.cookie-btn.decline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }

@media (max-width: 768px) {
    .site-nav { flex-direction: column; align-items: flex-start; }
    .article-body table { font-size: 13px; }
}

.ad-slot { min-height: 0; }
.ad-slot:not(:empty) { margin: 24px 0; text-align: center; }
