:root {
    /* Prince QR Palette */
    --primary-dark: #1C2B4B;
    /* C:100% M:86% Y:42% K:38% */
    --primary-teal: #1399AB;
    /* C:78% M:18% Y:13% K:3% */
    --primary-light: #E0F1F5;
    /* C:15% M:0% Y:5% K:0% */

    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-800: #1f2937;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Hero Gradient specific vars (Light Mode) */
    --hero-gradient-start: #1C2B4B;
    --hero-gradient-end: #2a406c;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--gray-100);
    color: var(--primary-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-teal);
}

/* Header */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo i {
    color: var(--primary-teal);
    font-size: 1.75rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.mobile-menu-toggle:hover {
    color: var(--primary-teal);
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

nav a.active,
nav a:hover {
    color: var(--primary-teal);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.btn-auth:hover {
    color: var(--primary-teal);
    background: var(--primary-light);
    border-color: var(--primary-teal);
}

.btn-auth.is-logged-in {
    color: var(--primary-teal);
}

.btn-auth i {
    font-size: 1.1rem;
}

.auth-menu {
    position: relative;
    display: none;
}

.auth-menu.is-visible {
    display: block;
}

.auth-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 190px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 200;
}

.auth-menu-panel.is-open {
    display: flex;
}

.auth-menu-panel a,
.auth-menu-panel button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--gray-800);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.95rem;
    border: none;
    background: transparent;
    text-align: left;
}

.auth-menu-panel a:hover,
.auth-menu-panel button:hover {
    background: var(--gray-100);
    color: var(--primary-teal);
}

.auth-toast {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    background: #111827;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 300;
}

.auth-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.auth-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gray-200);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 65px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 65px);
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 0;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 100;
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin: 0;
        padding: 1rem 2rem;
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
    }

    nav a:hover {
        background: var(--gray-100);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero h1 .highlight {
    color: var(--primary-teal);
    /* Ensure highlight pops on dark bg too if needed, or keep teal */
    background: -webkit-linear-gradient(45deg, var(--primary-teal), #4FD1C5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Generator Section */
.generator-section {
    flex: 1;
    margin-bottom: 4rem;
    margin-top: 4rem;
}

.generator-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    min-height: 500px;
}

@media (min-width: 768px) {
    .generator-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Mode Switcher */
.mode-switcher {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 999px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-btn:hover {
    border-color: var(--primary-teal);
    color: var(--primary-teal);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Controls Panel */
.controls-panel {
    flex: 1;
    width: 100%;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-teal);
    outline: none;
}

.input-group input:disabled {
    background: var(--gray-100);
    color: #64748b;
}

.input-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    resize: vertical;
}

.input-group textarea:focus {
    border-color: var(--primary-teal);
    outline: none;
}

.input-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
    cursor: pointer;
}

.input-group select:focus {
    border-color: var(--primary-teal);
    outline: none;
}

/* QR Type Selector */
.qr-type-selector {
    margin-bottom: 1.5rem;
}

.qr-type-selector>label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.type-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.type-tab {
    padding: 0.6rem 0.5rem;
    border: 2px solid var(--gray-200);
    background: var(--white);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.type-tab i {
    font-size: 1.2rem;
}

.type-tab:hover {
    background: var(--gray-100);
    border-color: var(--primary-teal);
}

.type-tab.active {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
    color: white;
}

.qr-form {
    margin-bottom: 1.5rem;
}

/* Accordion */
.accordion {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--gray-200);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 1rem;
    background: var(--gray-100);
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-dark);
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--gray-200);
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    background: var(--white);
}

.accordion-content.open {
    padding: 1.5rem;
    max-height: 500px;
    /* Arbitrary large height for animation */
    overflow-y: auto;
}

/* Color Pickers */
.color-picker-group {
    margin-bottom: 1rem;
}

.gradient-options-box {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.gradient-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.color-picker-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
}

.color-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 0;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

.hex-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: monospace;
    text-transform: uppercase;
}

.preset-colors {
    margin-top: 1rem;
}

.preset-colors p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary-teal);
}

.theme-btn .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Shape Options */
.shape-options {
    margin-bottom: 1rem;
}

.shape-options label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.shape-options select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

/* Preview Panel */
.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    position: sticky;
    top: 100px;
    /* Sticky preview on scroll */
}

.qr-canvas-container {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    /* Ensure container has dimensions to center canvas */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    min-width: 300px;
}

/* Allow canvas generated by lib to fit nicely */
.qr-canvas-container canvas {
    max-width: 100%;
    height: auto;
}

/* QR Options */
.qr-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.qr-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.qr-option-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.qr-option-group select {
    padding: 0.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.qr-option-group select:focus {
    border-color: var(--primary-teal);
    outline: none;
}

.download-buttons {
    display: grid;
    grid-template-columns: 2fr 1.5fr 0.5fr;
    /* PNG wide, SVG medium, Share small */
    gap: 0.5rem;
    width: 100%;
}

.btn {
    /* flex: 1; Removed flex:1 to let grid control width */
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-teal);
    color: white;
}

.btn-primary:hover {
    background: #0f7a8b;
}

.btn-secondary {
    background: var(--primary-dark);
    color: white;
}

.btn-secondary:hover {
    background: #152039;
}

/* Info Section */
.info-section {
    background: white;
    padding: 4rem 0;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    transition: transform 0.3s;
}

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

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-teal);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

/* Logo Options */
.logo-upload-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

input[type="file"] {
    font-size: 0.9rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 1rem;
    border: none;
    background: var(--primary-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: #152039;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    width: auto;
    align-self: flex-start;
}

/* History Section */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-count {
    font-size: 0.9rem;
    color: var(--gray-800);
    margin: 0;
}

#clear-history-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
}


.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.empty-history {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--gray-800);
    font-size: 0.9rem;
    padding: 2rem 1rem;
}

.history-item {
    position: relative;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.history-item:hover {
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.history-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.history-item-type {
    font-size: 0.75rem;
    color: var(--gray-800);
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
}

.history-item-delete {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    background: rgba(200, 0, 0, 1);
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

/* ========================================
   CONTENT PAGES STYLES (FAQ, Guide, About)
   ======================================== */

.content-page {
    padding: 3rem 0;
    flex: 1;
}

.content-page h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-page h1 i {
    color: var(--primary-teal);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gray-800);
    margin-bottom: 3rem;
}

/* Auth Pages */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card.auth-card--wide {
    max-width: 640px;
}

.auth-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-800);
    margin-bottom: 2rem;
}

.avatar-preview {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gray-200);
    margin: 0 auto 1rem;
    display: block;
    object-fit: cover;
}

.status-message {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.status-message.is-visible {
    display: block;
}

.status-message.success {
    background: #dcfce7;
    color: #166534;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
}

.hidden {
    display: none;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Guide Page */
.guide-section {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.guide-section h2 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
}

.guide-section h2 i {
    color: var(--primary-teal);
    font-size: 1.5rem;
}

.guide-section ul,
.guide-section ol {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.guide-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.guide-section strong {
    color: var(--primary-dark);
}

.tip-box,
.warning-box {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-box {
    background: #e0f7fa;
    border-left: 4px solid var(--primary-teal);
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.tip-box i,
.warning-box i {
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.tip-box i {
    color: var(--primary-teal);
}

.warning-box i {
    color: #ffc107;
}

/* FAQ Page */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-align: left;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--gray-100);
}

.faq-question span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-question i.fa-chevron-down {
    transition: transform 0.3s;
    color: var(--primary-teal);
}

.faq-question span i {
    color: var(--primary-teal);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-answer p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--gray-800);
}

.faq-answer ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.faq-answer strong {
    color: var(--primary-dark);
}

/* About Page */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-section {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.about-section h2 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
}

.about-section h2 i {
    color: var(--primary-teal);
}

.about-section p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.about-section ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.about-section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.use-case {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

.use-case i {
    font-size: 2.5rem;
    color: var(--primary-teal);
    margin-bottom: 1rem;
}

.use-case h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.use-case p {
    font-size: 0.95rem;
    color: var(--gray-800);
    margin: 0;
}

.features-list {
    list-style: none;
    margin-left: 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.features-list i {
    color: var(--primary-teal);
    margin-top: 0.25rem;
}

.tech-list {
    margin-left: 1.5rem;
}

.tech-list li {
    margin-bottom: 0.75rem;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2a406c 100%);
    color: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.stats-section h2 {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
}

.stats-section h2 i {
    color: var(--primary-teal);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-teal);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary-teal) 0%, #0f7a8b 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: 3rem;
}

.cta-box h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.cta-box .btn {
    display: inline-flex;
    background: white;
    color: var(--primary-teal);
    font-weight: 700;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.cta-box .btn:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-page h1 {
        font-size: 2rem;
    }

    .guide-section,
    .about-section {
        padding: 1.5rem;
    }

    .guide-section h2,
    .about-section h2 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .use-cases {
        grid-template-columns: 1fr;
    }

    nav a {
        margin-left: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .content-page h1 {
        font-size: 1.75rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    nav a {
        margin-left: 0.5rem;
        font-size: 0.8rem;
    }

    .cta-box {
        padding: 2rem 1.5rem;
    }
}

/* Mobile Optimizations (<420px) */
@media (max-width: 420px) {

    /* Mode Switcher - Stack buttons */
    .mode-switcher {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mode-btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }

    /* Type Tabs - 2 Columns Grid */
    .type-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .type-tab {
        width: 100%;
        /* Ensure full width in grid cell */
        justify-content: center;
        /* Center content */
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    /* Inputs - Better Spacing */
    .input-group input,
    .input-group textarea,
    .input-group select {
        font-size: 16px;
        /* Prevent zoom on iOS */
        padding: 0.8rem;
    }

    /* Scanner */
    #reader {
        width: 100% !important;
        height: auto !important;
    }

    #reader video {
        object-fit: cover;
        border-radius: 1rem;
    }

    /* Bulk Inputs - Stack horizontal groups */
    .input-group[style*="display: flex"] {
        flex-direction: column;
        gap: 1rem !important;
    }

    /* Footer Credit - Stack */
    .dev-credit-badge {
        flex-direction: column;
        gap: 0.2rem !important;
        padding: 0.8rem !important;
        width: 100% !important;
    }

    /* Download Buttons - Mobile */
    .download-buttons {
        grid-template-columns: 1fr;
        /* Stack vertically by default on very small screens */
        gap: 0.8rem;
    }

    #download-png {
        order: 1;
    }

    #download-svg {
        order: 2;
    }

    #share-btn {
        order: 3;
        /* Make share button full width text on mobile or just icon? */
        /* Let's keep it as is, but maybe users want to see "Compartir"? */
    }
}

/* --- Notifications --- */
#notification-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    pointer-events: none;
}

.notification-toast {
    background: var(--white);
    color: var(--primary-dark);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 90%;
    animation: slideUpFade 0.3s ease-out forwards;
    pointer-events: auto;
    border-left: 4px solid var(--primary-teal);
}

.notification-toast i {
    color: var(--primary-teal);
    font-size: 1.2rem;
}

.notification-toast.error {
    border-left-color: #ef4444;
}

.notification-toast.error i {
    color: #ef4444;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}
