:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --error-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    padding: 20px;
    padding-top: 65px;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 15px;
    left: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    z-index: 1000;
    text-decoration: none;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
    background: white;
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Breadcrumb */
.breadcrumb-nav {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 10px;
}

.breadcrumb {
    list-style: none;
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumb a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
    color: white;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto 40px;
}

.header {
    text-align: center;
    margin-bottom: 25px;
}

.header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Input Section */
.input-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.input-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Preview Section */
.preview-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.preview-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.qr-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: inline-block;
    margin: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#qrcode canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Customization */
.customization-section {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.customization-section h3 {
    margin-bottom: 5px;
    color: #333;
    font-size: 1.2rem;
}

.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.color-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-group input {
    width: 60px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
}

.size-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.size-group input {
    flex: 1;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.action-button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-button.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.action-button.secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #ddd;
}

.action-button.secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badges */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge.success {
    background: #d4edda;
    color: #155724;
}

.badge.info {
    background: #d1ecf1;
    color: #0c5460;
}

.stats {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 10px;
    font-size: 0.9rem;
}

.stats div {
    margin: 5px 0;
    color: #555;
}

/* SEO Content */
.seo-content {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #444;
    line-height: 1.8;
}

.seo-content h2 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 24px 0 10px;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content p {
    margin-bottom: 12px;
    font-size: 0.97rem;
}

.seo-content ul {
    margin: 8px 0 14px 20px;
}

.seo-content ul li {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

/* FAQ */
.faq-section {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.faq-item {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
}

.faq-item summary {
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 5px 0;
}

.faq-item summary:hover {
    color: var(--primary-color);
}

.faq-item p {
    margin-top: 10px;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Related Tools */
.related-tools {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.related-tools h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.4rem;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.related-link {
    display: inline-block;
    padding: 10px 20px;
    background: #e9ecef;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.related-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Footer */
footer {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: #333;
    color: white;
    border-radius: 8px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--error-color);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .related-links {
        flex-direction: column;
        align-items: stretch;
    }

    .related-link {
        text-align: center;
    }
}

/* Tool Switcher */
.tool-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 16px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.tool-switcher-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
    white-space: nowrap;
}

.tool-switch-btn {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-block;
}

.tool-switch-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.tool-switch-btn.active {
    background: white;
    color: #667eea;
    font-weight: 700;
    border-color: white;
    pointer-events: none;
}

@media (max-width: 600px) {
    .tool-switcher {
        gap: 6px;
        padding: 8px 12px;
    }

    .tool-switch-btn {
        font-size: 0.78rem;
        padding: 5px 10px;
    }
}