/* ===========================
   PR4 - Main Styles (Modern Bubble Design)
   =========================== */

/* TAGFLEET Design Charter v1.0 — BURAPRINT Division */

/* Force light mode — override smartphone dark mode */
:root {
    color-scheme: light;

    /* Division Brand (header only) */
    --division-color: #0EA5E9;

    /* Primary CTA (all buttons, links, interactive) */
    --primary-color: #1260A8;

    /* Semantic Colors */
    --success-color: #0F8A4F;
    --warning-color: #D4760A;
    --error-color: #CC2936;
    --info-color: #1260A8;

    /* Neutrals */
    --dark: #0D1B2A;
    --navy: #194B8A;
    --surface: #F4F7FA;
    --background: #F4F7FA;

    /* Text */
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-tertiary: #999999;

    /* Borders & Grays */
    --border: #E8E8E8;
    --grey-20: #CCCCCC;
    --grey-10: #E8E8E8;

    /* Shadows (Charter standard) */
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 2px 6px rgba(0,0,0,0.1);
    --shadow-hover: 0 2px 8px rgba(0,0,0,0.12);

    /* Radii */
    --radius: 12px;
    --radius-lg: 24px;
    --radius-button: 8px;

    /* Transitions */
    --transition: all 0.2s ease;
}

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

/* Landscape Warning Overlay (Mobile only) */
.landscape-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--division-color);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.landscape-warning-content {
    text-align: center;
    color: white;
    padding: 40px;
    max-width: 90%;
}

.rotate-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    animation: rotate-shake 1.5s ease-in-out infinite;
}

@keyframes rotate-shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
}

.landscape-warning-content h2 {
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.landscape-warning-content p {
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

/* Show warning only on mobile in landscape mode */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .landscape-warning {
        display: flex !important;
    }
}

/* PWA & Fullscreen Support */
html {
    /* Support pour le mode plein écran iOS */
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

html, body {
    /* Utiliser tout l'espace disponible */
    width: 100%;
    height: 100%;
    position: fixed;
    overflow: hidden;
}

body {
    /* Supporter les encoches des iPhone (notch) */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Base Styles - WeTransfer inspired */
body {
    font-family: 'Calibri', Arial, sans-serif;
    background: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
    /* Support du mode standalone PWA */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Permettre la sélection de texte dans les inputs */
input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Calibri', Arial, sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

/* Hover Effect for all interactive elements - Linktree Style */
.hover-effect {
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hover-effect:active {
    transform: translateY(0px);
}

/* Loading Screen - Modern Style */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0EA5E9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 1s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
}

/* Splash logo (when ads disabled) */
.splash-logo {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1;
}

.splash-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    animation: splashPulse 1.5s ease-in-out infinite;
}

.splash-logo-fallback {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: splashPulse 1.5s ease-in-out infinite;
}

.splash-brand-name {
    font-family: 'Calibri', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: white;
    letter-spacing: 2px;
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin: 0;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: white;
    width: 0%;
    animation: loadProgress 2s ease-out forwards;
    border-radius: 10px;
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
    font-family: 'Calibri', Arial, sans-serif;
    margin: 0;
    white-space: nowrap;
}

/* Header - WeTransfer Style */
.main-header {
    position: sticky;
    top: 0;
    background: var(--division-color);
    z-index: 100;
    transition: var(--transition);
}

/* Info Banner (white banner with blue text below header) */
.info-banner {
    position: sticky;
    top: 90px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 99;
    animation: bannerSlideIn 0.3s ease-out;
}

@keyframes bannerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-banner-content {
    max-width: 100%;
    padding: 14px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--division-color);
}

.info-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.info-line-main {
    font-size: 17px;
}

.info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.info-separator {
    color: var(--division-color);
    opacity: 0.7;
}

.info-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
    stroke: var(--division-color);
}

@media (max-width: 768px) {
    .info-banner {
        top: 82px;
    }

    .info-banner-content {
        padding: 12px 20px;
        font-size: 13px;
        gap: 3px;
    }

    .info-line-main {
        font-size: 15px;
    }

    .info-line {
        gap: 6px;
    }

    .info-icon {
        width: 12px;
        height: 12px;
    }
}

.header-content {
    max-width: 100%;
    margin: 0;
    padding: 20px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

@media (max-width: 768px) {
    .header-content {
        padding: 16px 20px;
    }

    .language-selector {
        left: 10px;
    }
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.logo-main {
    max-height: 50px;
    max-width: 200px;
    height: auto;
    width: auto;
    object-fit: contain;
    cursor: pointer;
    transition: var(--transition);
}

.logo-main:hover {
    opacity: 0.9;
}

.logo-title {
    color: white;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Language Selector - Linktree Style */
.language-selector {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.current-flag {
    width: 50px;
    height: 35px;
    border-radius: 6px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.current-flag:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.language-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    min-width: 180px;
    border: 1px solid rgba(0,0,0,0.06);
}

.language-selector:hover .language-dropdown {
    display: grid;
    animation: slideIn 0.3s ease-out;
}

/* Info Button - Top Right */
.info-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.info-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.info-btn svg {
    width: 20px;
    height: 20px;
}

.info-btn .info-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .info-btn {
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .info-btn svg {
        width: 18px;
        height: 18px;
    }

    .info-btn .info-icon {
        width: 36px;
        height: 36px;
    }
}

/* Toast Notification for Undo */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d2d2d;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    animation: toastSlideIn 0.3s ease-out;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 15px;
    min-width: 300px;
}

.toast-notification.hide {
    animation: toastSlideOut 0.3s ease-out forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.toast-message {
    flex: 1;
    color: #ffffff;
    font-weight: 400;
    white-space: nowrap;
}

.toast-undo-btn {
    background: transparent;
    border: none;
    color: #1260A8;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.toast-undo-btn:hover {
    color: #194B8A;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toast-close-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.toast-close-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
}

.toast-timer {
    display: none;
}

/* Info Modal - RGPD & Legal */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.info-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
}

.info-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Tabs */
.info-modal-tabs {
    display: flex;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    padding: 0 24px;
    gap: 8px;
}

.info-tab {
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.info-tab:hover {
    color: var(--primary-color);
}

.info-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* Tab Content */
.info-modal-body {
    overflow-y: auto;
    padding: 24px;
    flex: 1;
}

.info-tab-content {
    display: none;
}

.info-tab-content.active {
    display: block;
}

.info-modal-body section {
    margin-bottom: 24px;
}

.info-modal-body section:last-child {
    margin-bottom: 0;
}

.info-modal-body h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.info-modal-body p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.info-modal-body p:last-child {
    margin-bottom: 0;
}

.info-modal-body ul,
.info-modal-body ol {
    margin: 0 0 12px 0;
    padding-left: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.info-modal-body li {
    margin-bottom: 8px;
}

.info-modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.info-modal-body small {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
}

/* ============================================
   RGPD Confirmation Modal
   ============================================ */

.rgpd-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rgpd-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.rgpd-modal-content {
    position: relative;
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rgpd-modal-header {
    padding: 32px 32px 24px 32px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.rgpd-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin: 0 auto 16px auto;
}

.rgpd-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.rgpd-modal-body {
    padding: 32px;
    overflow-y: auto;
}

.rgpd-main-text {
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
}

.rgpd-highlights {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.rgpd-highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-primary);
}

.rgpd-highlight-item:last-child {
    margin-bottom: 0;
}

.rgpd-highlight-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.rgpd-secondary-text {
    margin: 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.rgpd-secondary-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.rgpd-secondary-text a:hover {
    text-decoration: underline;
}

.rgpd-modal-actions {
    padding: 24px 32px 32px 32px;
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.rgpd-btn-cancel,
.rgpd-btn-accept {
    flex: 1;
    height: 56px;
    min-height: 56px;
    border-radius: 50px;
    font-family: 'Calibri', Arial, sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.rgpd-btn-cancel {
    background: #f1f3f5;
    color: var(--text-secondary);
}

.rgpd-btn-cancel:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.rgpd-btn-accept {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(18, 96, 168, 0.3);
}

.rgpd-btn-accept:hover {
    box-shadow: 0 6px 16px rgba(18, 96, 168, 0.4);
    transform: translateY(-1px);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .rgpd-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 20px;
    }

    .rgpd-modal-header {
        padding: 24px 24px 20px 24px;
    }

    .rgpd-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .rgpd-modal-header h3 {
        font-size: 20px;
    }

    .rgpd-modal-body {
        padding: 24px;
    }

    .rgpd-main-text {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .rgpd-highlights {
        padding: 16px;
        margin-bottom: 20px;
    }

    .rgpd-highlight-item {
        font-size: 13px;
        gap: 10px;
        margin-bottom: 12px;
    }

    .rgpd-highlight-item svg {
        width: 18px;
        height: 18px;
    }

    .rgpd-modal-actions {
        padding: 20px 24px 24px 24px;
        flex-direction: column;
    }

    .rgpd-btn-cancel,
    .rgpd-btn-accept {
        width: 100%;
    }
}

/* ============================================
   Badges Container (bottom-left corner)
   ============================================ */

/* TAGFLEET Charter: Zero dev info visible in production */
.bp-badges-container {
    display: none !important;
}

/* ============================================
   API Badge
   ============================================ */

.bp-api-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bp-api-badge .bp-api-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-api-badge .bp-api-icon svg {
    width: 12px;
    height: 12px;
}

/* API checking state (orange/yellow) */
.bp-api-badge.bp-api-checking {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(254, 243, 199, 0.85);
    color: #92400e;
}

.bp-api-badge.bp-api-checking .bp-api-icon svg {
    stroke: #D4760A;
    animation: pulse-api 1.5s ease-in-out infinite;
}

/* API connected state (green) */
.bp-api-badge.bp-api-connected {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(220, 252, 231, 0.85);
    color: #166534;
}

.bp-api-badge.bp-api-connected .bp-api-icon svg {
    stroke: #0F8A4F;
}

/* API offline/fallback state (gray) */
.bp-api-badge.bp-api-offline {
    border-color: rgba(107, 114, 128, 0.3);
    background: rgba(243, 244, 246, 0.85);
    color: #6b7280;
}

.bp-api-badge.bp-api-offline .bp-api-icon svg {
    stroke: #9ca3af;
}

/* API error state (red) */
.bp-api-badge.bp-api-error {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(254, 226, 226, 0.85);
    color: #991b1b;
}

.bp-api-badge.bp-api-error .bp-api-icon svg {
    stroke: #CC2936;
}

@keyframes pulse-api {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.bp-api-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bp-api-badge:active {
    transform: scale(0.98);
}

/* ============================================
   Version Badge
   ============================================ */

.bp-version {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bp-version:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bp-version:active {
    transform: scale(0.98);
}

.bp-version:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .bp-badges-container {
        gap: 4px;
    }

    .bp-version {
        font-size: 11px;
        padding: 3px 6px;
    }

    .bp-api-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    .bp-api-badge .bp-api-icon svg {
        width: 10px;
        height: 10px;
    }
}

/* ============================================
   Debug Modal (triple-tap on logo)
   ============================================ */

.debug-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.debug-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.debug-modal-content {
    position: relative;
    background: #1a1a1a;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.debug-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.debug-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Calibri', Arial, sans-serif;
}

.debug-modal-header .copy-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.debug-modal-header .copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.debug-modal-header .copy-btn svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
}

.debug-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.debug-section {
    margin-bottom: 24px;
}

.debug-section:last-child {
    margin-bottom: 0;
}

.debug-section h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Calibri', Arial, sans-serif;
}

.debug-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 6px;
    gap: 12px;
}

.debug-row:last-child {
    margin-bottom: 0;
}

.debug-row-full {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.debug-label {
    font-size: 13px;
    color: #aaa;
    font-weight: 500;
    flex-shrink: 0;
}

.debug-value {
    font-size: 13px;
    color: #0ff;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

.debug-value-small {
    font-size: 11px;
    color: #888;
    text-align: left;
    font-weight: 400;
}

.debug-copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.debug-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.debug-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.debug-btn {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    font-family: 'Calibri', Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.debug-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .debug-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .debug-modal-header {
        padding: 16px 20px;
    }

    .debug-modal-body {
        padding: 16px 20px;
    }

    .debug-section h4 {
        font-size: 11px;
    }

    .debug-row {
        padding: 6px 10px;
    }

    .debug-label,
    .debug-value {
        font-size: 12px;
    }

    .debug-modal-footer {
        padding: 12px 20px;
        flex-direction: column;
    }

    .debug-btn {
        width: 100%;
    }
}

/* Main App Container - WeTransfer Style */
#app {
    height: 100%;
    background: #ffffff;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#app::-webkit-scrollbar {
    width: 1px;
}

#app::-webkit-scrollbar-track {
    background: transparent;
}

#app::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes loadProgress {
    to { width: 100%; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notifications - Linktree Style */
#notifications-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10000;
    pointer-events: none;
}

.notification {
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    pointer-events: auto;
    border: 1px solid rgba(0,0,0,0.06);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.notification.success {
    border-color: var(--success-color);
}

.notification.success .notification-icon {
    color: var(--success-color);
}

.notification.error {
    border-color: var(--error-color);
}

.notification.error .notification-icon {
    color: var(--error-color);
}

.notification.info {
    border-color: var(--primary-color);
}

.notification.info .notification-icon {
    color: var(--primary-color);
}

/* Session Info */
.session-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.session-date {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Calibri', Arial, sans-serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* Language Selection Modal */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.language-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.language-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
}

.language-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.language-modal-body {
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.language-option:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.language-option.active {
    background: rgba(18, 96, 168, 0.08);
    border-color: var(--primary-color);
}

.language-option img {
    width: 50px;
    height: 35px;
    border-radius: 6px;
    flex-shrink: 0;
}

.language-option span {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Accessibility */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 8px;
}

/* Powered by TAGFLEET Footer */
.tagfleet-footer {
    position: fixed;
    bottom: 98px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-tertiary);
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 11px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .tagfleet-footer {
        bottom: 100px;
    }
}