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

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* Minimal button base (replaces Bootstrap's .btn) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    text-decoration: underline;
}

/* Primary Purple Theme */
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

/* Secondary Purple Theme (replaces green) */
.btn-success {
    background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: white;
}

    .btn-success:hover {
        background: linear-gradient(135deg, #805ad5 0%, #6b46c1 100%);
        transform: translateY(-1px);
        color: white;
    }

/* Accent Purple Theme */
.btn-info {
    background: linear-gradient(135deg, #b794f6 0%, #9f7aea 100%);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: white;
}

    .btn-info:hover {
        background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
        transform: translateY(-1px);
        color: white;
    }

/* Neutral secondary style for actions like Share */
.btn-secondary {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    color: #2d3748;
    border: 1px solid rgba(45,55,72,0.06);
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 600;
    transition: all 0.18s ease;
}

    .btn-secondary:hover {
        background: linear-gradient(135deg, #e6eef8 0%, #d6dfe8 100%);
        transform: translateY(-1px);
        color: #1f2937;
    }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus:not([type="radio"]) {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(102, 126, 234, 0.5);
}

.content {
    padding: 1rem 0.5rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #9f7aea;
    border-color: #9f7aea;
}

.invalid {
    outline: 1px solid #f56565;
    border-color: #f56565;
}

.validation-message {
    color: #f56565;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* Compact Form Controls with Light Placeholders */
.form-control {
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    height: 36px;
}

    .form-control::placeholder {
        color: #a0aec0;
        opacity: 0.7;
        font-style: italic;
    }

    .form-control:focus {
        border-color: #667eea;
        background-color: white;
        box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.2);
    }

        .form-control:focus::placeholder {
            color: #cbd5e0;
            opacity: 0.5;
        }

.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

/* Compact App Container - now used for form styling */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* Compatibility utilities (lightweight replacements for used Bootstrap utilities) */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.centered {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.mt-3 { margin-top: 0.75rem !important; }

.img-fluid { display: block; max-width: 100%; height: auto; }

/* Ultra-Compact Form Section */
.form-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Footer inside form sections: center and remove underline (override other rules) */
.form-section .app-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-section .app-footer a {
    text-decoration: none !important;
    color: #ffd166;
    font-weight: 600;
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1rem;
    margin: 0;
    text-align: center;
}

    .form-header h2 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 600;
    }

.form-body {
    padding: 1rem;
}

/* Extremely Compact Form Sections */
.form-group-section {
    background: rgba(248, 250, 252, 0.6);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

    .form-group-section:last-of-type {
        margin-bottom: 0;
    }

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .section-title::before {
        content: '';
        width: 3px;
        height: 14px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 2px;
    }

/* Compact Field Groups */
.field-group {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

    .field-group:last-child {
        margin-bottom: 0;
    }

    .field-group.two-column {
        grid-template-columns: 2fr 1fr;
    }

    .field-group.three-column {
        grid-template-columns: 1fr 0.8fr 1fr;
    }

/* === CUSTOM RADIO BUTTON SYSTEM === */
/* 
 * This application uses a completely custom radio button experience.
 * Native radio buttons are made invisible while maintaining accessibility,
 * and visual feedback is provided through custom container styling.
 */

/* Compact Radio Buttons */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.radio-option {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

    .radio-option:hover {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.05);
    }

    .radio-option.selected {
        border-color: #667eea;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    }

    .radio-option .option-label {
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 0.2rem;
        font-size: 0.85rem;
    }

    .radio-option .option-description {
        font-size: 0.75rem;
        color: #718096;
        line-height: 1.2;
    }

    /* === INVISIBLE RADIO BUTTONS === */
    /* 
 * Radio buttons are completely hidden visually but remain accessible 
 * for keyboard navigation and screen readers.
 */

    /* Specific styling for radio buttons within radio-option containers */
    .radio-option input[type="radio"] {
        position: absolute;
        top: 0.4rem;
        right: 0.4rem;
        margin: 0;
        width: 12px;
        height: 12px;
        /* Complete visual hiding while maintaining accessibility */
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        border: none !important;
        outline: none !important;
        background: none !important;
        box-shadow: none !important;
        opacity: 0 !important;
        z-index: 1;
    }

/* Global radio button styling - ensure all radio buttons are invisible */
input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

    /* === BOOTSTRAP OVERRIDES === */
    /* 
 * Comprehensive overrides to prevent Bootstrap from showing 
 * any radio button styling.
 */

    /* Override Bootstrap form-check-input styling for radio buttons */
    .form-check-input[type="radio"],
    input[type="radio"].form-check-input {
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: none !important;
    }

        /* Override Bootstrap focus and interaction states */
        .form-check-input[type="radio"]:focus,
        input[type="radio"].form-check-input:focus,
        input[type="radio"]:focus-visible,
        input[type="radio"]:active,
        input[type="radio"]:checked {
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
            background: none !important;
        }

    /* Override Bootstrap form validation states */
    .was-validated input[type="radio"]:valid,
    .was-validated input[type="radio"]:invalid,
    input[type="radio"].is-valid,
    input[type="radio"].is-invalid {
        border: none !important;
        outline: none !important;
        background: none !important;
    }

    /* Override Blazor's modified class */
    input[type="radio"].modified {
        border: none !important;
        outline: none !important;
        background: none !important;
    }

/* === ACCESSIBILITY FOCUS HANDLING === */
/* 
 * Custom focus handling for radio buttons that provides visual feedback
 * through the container rather than the radio button itself.
 */

/* Focus handling for radio buttons - show focus on the container */
.radio-option:has(input[type="radio"]:focus) {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Fallback for browsers that don't support :has() */
.radio-option input[type="radio"]:focus {
    /* This creates a subtle focus ring around the invisible radio button area */
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* Modal Styles for QR Code */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

    .modal-header h2 {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 600;
    }

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

    .modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.modal-body {
    padding: 1.5rem;
    text-align: center;
}

.modal-subtitle {
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.qr-code-display {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 0 1.5rem 0;
    border: 2px solid #f7fafc;
}

/* Compact Button Groups */
.action-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

    .action-buttons .btn {
        min-width: 120px;
    }

/* QR data UI removed: styles deleted */

/* Compact Generate Button */
.generate-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.8rem auto 0;
    min-width: 180px;
    justify-content: center;
}

    .generate-button:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .app-title {
        font-size: 1.8rem;
    }

    .app-subtitle {
        font-size: 0.9rem;
    }

    .content {
        padding: 0.5rem 0.25rem;
    }

    .modal-content {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-header, .modal-body {
        padding: 1rem;
    }

    .form-body {
        padding: 0.8rem;
    }

    .form-group-section {
        padding: 0.6rem;
    }

    .field-group.two-column,
    .field-group.three-column {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .radio-group {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .radio-option {
        padding: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }

        .action-buttons .btn {
            width: 100%;
            max-width: 200px;
        }

    .generate-button {
        width: 100%;
        max-width: 240px;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 1.6rem;
    }

    .form-header {
        padding: 0.6rem 0.8rem;
    }

    .form-body {
        padding: 0.6rem;
    }

    .form-group-section {
        padding: 0.5rem;
        margin-bottom: 0.6rem;
    }

    .radio-option {
        padding: 0.4rem 0.6rem;
    }

        .radio-option input[type="radio"] {
            width: 10px;
            height: 10px;
            top: 0.3rem;
            right: 0.3rem;
        }
}

/* Improved Focus States for Accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Enhanced Error States */
.alert-danger {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, rgba(229, 62, 62, 0.1) 100%);
    border: 1px solid rgba(245, 101, 101, 0.3);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
}

/* Utility Classes */
.text-required {
    color: #f56565;
    font-weight: 600;
}

.field-help {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.2rem;
    line-height: 1.3;
}

/* Remove extra spacing */
.mb-3 {
    margin-bottom: 0.6rem !important;
}

.mb-4 {
    margin-bottom: 0.8rem !important;
}

/* Override Bootstrap spacing to make it more compact */
.form-control, .form-select {
    margin-bottom: 0;
}

/* Compact small text elements */
small {
    font-size: 0.75rem;
    color: #718096;
}

/* Animation for modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA9NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSA0LjM4NTYgNjkuNzQ4MiAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEggMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg NjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI6MyA5My4wMTkgOS4wNzMgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: #718096;
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Language Selector Styles */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.title-section {
    flex: 1;
    text-align: left;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-section {
    min-width: 150px;
    text-align: right;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

    .nav-link:hover {
        color: white;
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
        text-decoration: none;
    }

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-section {
    min-width: 200px;
    text-align: right;
}

.language-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

    .language-selector .form-label {
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 0.2rem;
        font-size: 0.8rem;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    }

    .language-selector .form-control {
        width: auto;
        min-width: 140px;
        font-size: 0.85rem;
        padding: 6px 10px;
        height: auto;
        background-color: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

        .language-selector .form-control:focus {
            background-color: white;
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.3);
        }

.language-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    font-style: italic;
    text-align: right;
    margin-top: 0.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile adjustments for header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.8rem;
    }

    .title-section {
        text-align: left;
        flex: 1;
    }

    .header-controls {
        flex-direction: row;
        gap: 0.75rem;
    }

    .language-section {
        min-width: auto;
        text-align: center;
    }

    .language-selector {
        align-items: center;
    }

    .language-info {
        text-align: center;
    }

    .app-title {
        font-size: 1.8rem;
    }

    .app-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .language-selector .form-control {
        min-width: 120px;
        font-size: 0.8rem;
    }

    .language-info {
        font-size: 0.65rem;
    }
}

/* About Page Styles */
.about-page {
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

    .about-header h1 {
        color: #2c3e50;
        margin-bottom: 1rem;
    }

.about-page .lead {
    font-size: 1.2rem;
    color: #6c757d;
}

.about-section {
    margin-bottom: 3rem;
}

    .about-section h2 {
        color: #2c3e50;
        margin-bottom: 1.5rem;
        border-bottom: 2px solid #007bff;
        padding-bottom: 0.5rem;
    }

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

    .feature-item i {
        font-size: 2rem;
        color: #007bff;
        margin-top: 0.5rem;
    }

    .feature-item h4 {
        margin-bottom: 0.5rem;
        color: #2c3e50;
    }

.capability-list, .limitation-list, .standards-list {
    list-style: none;
    padding: 0;
}

    .capability-list li, .standards-list li {
        padding: 0.5rem 0;
        border-bottom: 1px solid #e9ecef;
        position: relative;
        padding-left: 2rem;
    }

        .capability-list li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: #28a745;
            font-weight: bold;
        }

    .limitation-list li {
        padding: 0.5rem 0;
        border-bottom: 1px solid #e9ecef;
        position: relative;
        padding-left: 2rem;
        color: #6c757d;
    }

        .limitation-list li::before {
            content: "✗";
            position: absolute;
            left: 0;
            color: #dc3545;
            font-weight: bold;
        }

.privacy-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

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

.privacy-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

    .privacy-item i {
        font-size: 2.5rem;
        color: #28a745;
        margin-bottom: 1rem;
    }

    .privacy-item h4 {
        color: #2c3e50;
        margin-bottom: 0.5rem;
    }

.back-section {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

/* Mobile adjustments for About page */
@media (max-width: 768px) {
    .about-page {
        padding: 1rem;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .privacy-highlights {
        grid-template-columns: 1fr;
    }
}
/* Mode Toggle Styles */
.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.toggle-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

    .toggle-switch:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
    }

    .toggle-switch.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-color: rgba(102, 126, 234, 0.5);
        box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.2);
    }

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mode-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .header-controls {
        gap: 0.8rem;
    }

    .toggle-label {
        font-size: 0.75rem;
    }

    .toggle-switch {
        width: 44px;
        height: 24px;
    }

    .toggle-slider {
        width: 16px;
        height: 16px;
    }

    .toggle-switch.active .toggle-slider {
        transform: translateX(18px);
    }

    .mode-description {
        font-size: 0.65rem;
    }
}

/* Theme system: variables and theme classes */
:root{
    --bg-gradient: radial-gradient(1200px circle at 10% 10%, rgba(94,234,212,0.06), transparent 6%), linear-gradient(135deg,#071428 0%,#0b2540 60%,#041028 100%);
    --primary-gradient: linear-gradient(135deg,#07203a 0%,#0b2540 60%,#07334a 100%);
    --accent: #5eead4;
    --accent-2: #7af3d1;
    --text-color: #e6eef8;
    --muted: #9fb3c8;
    --surface: rgba(3,8,15,0.75);
    --meta-theme-color: #07203a;
}

/* Predefined theme classes */
.theme-ocean{
    --bg-gradient: linear-gradient(135deg,#0ea5a4 0%,#056e6e 100%);
    --primary-gradient: linear-gradient(135deg,#0ea5a4 0%,#056e6e 100%);
    --accent: #ff6b6b;
    --text-color: #073642;
    --surface: #f5fcfb;
    --meta-theme-color: #0ea5a4;
}

.theme-sunset{
    --bg-gradient: linear-gradient(135deg,#ff7a59 0%,#ff4e50 100%);
    --primary-gradient: linear-gradient(135deg,#ff7a59 0%,#ff4e50 100%);
    --accent: #0b2545;
    --text-color: #2b2b2b;
    --surface: #fff6f3;
    --meta-theme-color: #ff7a59;
}

.theme-forest{
    --bg-gradient: linear-gradient(135deg,#2f855a 0%,#22543d 100%);
    --primary-gradient: linear-gradient(135deg,#2f855a 0%,#22543d 100%);
    --accent: #d69e2e;
    --text-color: #123420;
    --surface: #fbfdf8;
    --meta-theme-color: #2f855a;
}

.theme-midnight{
    --bg-gradient: radial-gradient(1200px circle at 10% 10%, rgba(94,234,212,0.06), transparent 6%), linear-gradient(135deg,#071428 0%,#0b2540 60%,#041028 100%);
    --primary-gradient: linear-gradient(135deg,#07203a 0%,#0b2540 60%,#07334a 100%);
    --accent: #5eead4;
    --accent-2: #7af3d1;
    --text-color: #e6eef8;
    --muted: #9fb3c8;
    --surface: rgba(3,8,15,0.75);
    --meta-theme-color: #07203a;
}

/* Midnight-specific element overrides to improve contrast and depth */
.theme-midnight .form-control {
    background-color: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
    color: var(--text-color);
}
.theme-midnight .form-control::placeholder { color: rgba(231,241,246,0.35); }
.theme-midnight .modal-content {
    background: rgba(2,6,12,0.86);
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 12px 40px rgba(2,6,12,0.6);
    color: var(--text-color);
}
.theme-midnight .form-label {
    color: rgba(230,238,248,0.95) !important;
}
.theme-midnight .nav-link {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.04);
    color: var(--text-color);
}
.theme-midnight .btn-primary, .theme-midnight .generate-button {
    box-shadow: 0 6px 24px rgba(46,234,212,0.07), 0 0 18px rgba(46,234,212,0.03);
}
.theme-midnight .section-title::before {
    background: linear-gradient(135deg,#5eead4 0%, #0b2540 100%);
}


/* QR data dark-theme styles removed */

/* Darken form containers so inputs are visible on dark theme */
.theme-midnight .form-section,
.theme-midnight .form-group-section,
.theme-midnight .form-body,
.theme-midnight .field-group {
    background: rgba(2,8,12,0.35);
    border: 1px solid rgba(255,255,255,0.04);
    color: var(--text-color);
}

/* Ensure top Data/URL input is clearly visible */
.theme-midnight input.form-control#url,
.theme-midnight .field-group input.form-control,
.theme-midnight .field-group .form-control {
    background-color: rgba(0,0,0,0.35) !important;
    color: #ffffff !important;
    border: 1px solid rgba(122,242,220,0.12) !important;
}

.theme-midnight input.form-control#url::placeholder,
.theme-midnight .field-group .form-control::placeholder {
    color: rgba(255,255,255,0.6) !important;
}

/* Focus styles to make the field clear it's interactive */
.theme-midnight .qr-data-section input:focus,
.theme-midnight .qr-data-section textarea:focus,
.theme-midnight .qr-data-section .form-control:focus {
    outline: none !important;
    border-color: rgba(122, 242, 220, 0.95) !important;
    box-shadow: 0 0 0 0.18rem rgba(94,234,212,0.12) !important;
    background-color: rgba(255,255,255,0.03) !important;
}

.theme-coral{
    --bg-gradient: linear-gradient(135deg,#ff9a8b 0%,#ff6f61 100%);
    --primary-gradient: linear-gradient(135deg,#ff9a8b 0%,#ff6f61 100%);
    --accent: #7c3aed;
    --text-color: #3b2f2f;
    --surface: #fff7f5;
    --meta-theme-color: #ff9a8b;
}

/* Apply variables to key elements so themes can override the hard-coded purple styles */
html, body { background: var(--bg-gradient); color: var(--text-color); }
.form-header, .modal-header, .btn-primary, .generate-button, .section-title::before, .radio-option.selected, .btn-success, .btn-info, .toggle-switch.active {
    background: var(--primary-gradient) !important;
    color: white !important;
}
.form-control { background-color: var(--surface); }
.form-control:focus { border-color: var(--meta-theme-color); box-shadow: 0 0 0 0.15rem rgba(0,0,0,0.06); }
.nav-link { background: rgba(255,255,255,0.06); }

/* Theme selector UI */
.theme-switcher-container{
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 4px;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    backdrop-filter: blur(6px);
    box-shadow: none;
    opacity: 0.78;
    transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    font-size: 0.82rem;
}
.theme-switcher-select{
    appearance: none;
    -webkit-appearance: none;
    padding: 6px 8px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.82rem;
    min-width: 110px;
}

.theme-switcher-container:hover{
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.theme-switcher-container label{
    margin-right: 6px;
    color: rgba(0,0,0,0.6);
    font-weight: 600;
    font-size: 0.78rem;
    transition: opacity 120ms ease;
}

/* Hide label by default for a more discreet UI; reveal on hover */
.theme-switcher-container label{ opacity: 0; width: 0; overflow: hidden; }
.theme-switcher-container:hover label{ opacity: 1; width: auto; }

@media (prefers-color-scheme: dark) {
    .theme-switcher-container{ background: rgba(255,255,255,0.04); }
    .theme-switcher-container label{ color: rgba(255,255,255,0.78); }
}

@media (max-width: 480px) {
    /* Move theme selector to bottom-left on narrow screens to avoid overlapping
       the PWA install button which sits at bottom-right. */
    .theme-switcher-container{ top: auto; bottom: 12px; left: 12px; right: auto; }
    .theme-switcher-select{ min-width: 86px; font-size: 0.78rem; }
    .theme-switcher-container:hover{ transform: none; }
}

