/* 
  Saro Files - Premium Glassmorphic UI (Refined Light Mode)
  Mobile-First, Elegant Design
*/

:root {
    --bg-dark: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 4px 20px rgba(31, 38, 135, 0.08);
    
    --primary-neon: #0ea5e9;
    --primary-purple: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, var(--primary-neon), var(--primary-purple));
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --danger: #ef4444;
    --success: #10b981;
    
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Standardized Cross-Browser Typography Stacks */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-main);
    font-synthesis: none;
    font-synthesis-weight: none;
    font-synthesis-style: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation;
}

html {
    font-size: 19px;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    translate: no;
}

body {
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    translate: no;
}

/* Native UI & Touch Reset Enhancements */
img, svg, video, canvas, .app-logo, .pwalogo, .logo-wrapper {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

input, textarea, select, [contenteditable="true"], .selectable-text {
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
    touch-action: manipulation;
}

button, a, [role="button"], label {
    touch-action: manipulation;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Auto-Translation Disable class helper */
.notranslate {
    translate: no;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Base Screens */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 10;
    transform: translateY(10px) scale(0.99);
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    z-index: 20;
    transform: translateY(0) scale(1);
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

.centered-panel {
    margin: auto;
    width: 92%;
    max-width: 480px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Home Screen */
.home-container {
    margin: auto;
    width: 92%;
    max-width: 480px;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.logo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: var(--glass-bg);
    border-radius: 28px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.15);
}

.app-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.2));
}

.home-container h1 {
    font-size: 2.1rem;
    margin-bottom: 2.5rem;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.mode-selection {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.35rem;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    color: var(--text-main);
}

.primary-gradient {
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
    color: white; 
    border: none;
}

.secondary-glass {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mode-icon svg {
    width: 28px;
    height: 28px;
    opacity: 0.9;
}

.primary-gradient .mode-icon svg {
    color: white;
}

.mode-text h3 {
    font-size: 1.15rem;
    margin: 0;
}

.mode-text span {
    font-size: 0.85rem;
    opacity: 0.8;
    font-family: var(--font-main);
    font-weight: 500;
}

.hover-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}
.hover-lift:active {
    transform: scale(0.96);
}

/* App Footer */
.app-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-footer p {
    margin: 0;
}

.app-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.app-footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

button.back-btn, .back-btn.icon-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #4f46e5 !important; /* Deep Indigo / Royal Purple icon color */
    background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 100%) !important; /* Vibrant Cyan-to-Violet tinted glass */
    border: 1.5px solid #a5b4fc !important; /* Vibrant Indigo border accent */
    width: 44px;
    height: 44px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    backdrop-filter: blur(10px);
    border-radius: 50%;
}
button.back-btn:hover, .back-btn.icon-btn:hover {
    background: linear-gradient(135deg, #bae6fd 0%, #ddd6fe 100%) !important;
    border-color: #6366f1 !important;
    color: #2563eb !important; /* Vibrant Royal Blue icon on hover */
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
button.back-btn svg, .back-btn.icon-btn svg { width: 28px; height: 28px; }

.centered-panel h2 {
    font-size: 1.6rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.status-msg {
    margin: 0.5rem 0 1.25rem;
    font-size: 0.95rem;
    color: var(--primary-neon);
    min-height: 1.2em;
    font-weight: 600;
}

.passcode-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#passcode-input {
    width: 100%;
    padding: 1rem;
    font-size: 2rem;
    letter-spacing: 0.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 14px;
    outline: none;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

#passcode-input:focus {
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.15), inset 0 2px 4px rgba(0,0,0,0.02);
}

#connect-btn {
    padding: 1.2rem;
    font-size: 1.15rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
}
#connect-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    box-shadow: none;
}

.divider {
    margin: 1.25rem 0;
    width: 100%;
    height: 1px;
    background: rgba(0,0,0,0.06);
    position: relative;
}
.divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-dark);
    padding: 0 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    width: 100%;
}

.action-btn {
    padding: 1.1rem;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.action-btn svg {
    width: 24px;
    height: 24px;
    color: var(--primary-purple);
}

#btn-share-link {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
}

/* Offline QR Screen */
.offline-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.huge-btn {
    padding: 1.45rem 1.2rem;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
}

.huge-btn h3 {
    font-size: 1.25rem;
    margin: 0;
}

.huge-btn span {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Modals & Overlays */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.qr-panel {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    max-width: 90%;
    background: white;
}
.qr-panel h3 {
    font-size: 1.1rem;
}

button.close-btn, .close-btn.icon-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(251, 113, 133, 0.25));
    color: #f43f5e;
    border: 1.5px solid rgba(244, 63, 94, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.25);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 20;
    padding: 0;
}
button.close-btn:hover, .close-btn.icon-btn:hover {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
    border-color: transparent;
}
button.close-btn svg, .close-btn.icon-btn svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
    transition: all 0.3s ease;
}

.qr-code-wrapper {
    background: white;
    padding: 0.8rem;
    border-radius: 12px;
    margin: 1rem auto;
    display: inline-block;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    max-width: 100%;
}

.qr-code-wrapper canvas, .qr-code-wrapper img {
    max-width: 100%;
    height: auto !important;
}

.qr-desc {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-neon);
}

#btn-qr-scanned-next {
    padding: 1.35rem 1.8rem;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
    letter-spacing: 0.5px;
    transition: var(--transition);
}

/* Scanner */
.scanner-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: #000;
}

#reader {
    width: 100%;
    height: 100%;
}

button.scanner-close, .scanner-close.icon-btn {
    display: none;
}

.scanner-ui {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 3.5rem;
    z-index: 105;
}

.scan-reticle {
    width: 220px;
    height: 220px;
    border: 2px solid var(--primary-neon);
    border-radius: 16px;
    box-shadow: 0 0 0 4000px rgba(0,0,0,0.5);
    position: relative;
}
.scan-reticle::after {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: var(--primary-neon);
    box-shadow: 0 0 10px var(--primary-neon);
    animation: scan-line 2s infinite ease-in-out;
}

@keyframes scan-line {
    0% { transform: translateY(-100px); }
    50% { transform: translateY(100px); }
    100% { transform: translateY(-100px); }
}

.scanner-ui p {
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    margin-bottom: 0.5rem;
}

.scanner-cancel-btn {
    pointer-events: auto;
    margin-top: 0.75rem;
    padding: 1.1rem 3.2rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 35px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transition: var(--transition);
}
.scanner-cancel-btn:hover, .scanner-cancel-btn:active {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 1);
    transform: scale(1.05);
}

/* Tap-to-focus visual box */
.focus-box {
    position: absolute;
    width: 70px;
    height: 70px;
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    pointer-events: none;
    z-index: 105;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.6), inset 0 0 12px rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.1);
}
.focus-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #0ea5e9;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
@keyframes focusPulse {
    0% { transform: scale(1.4); opacity: 0; }
    30% { transform: scale(1); opacity: 1; border-color: #38bdf8; }
    80% { transform: scale(0.95); opacity: 0.9; }
    100% { transform: scale(0.9); opacity: 0; }
}
.animate-focus {
    animation: focusPulse 1.2s ease-out forwards;
}

/* Main Transfer Screen */
.app-header {
    height: 56px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    z-index: 50;
    box-shadow: 0 1px 8px rgba(0,0,0,0.02);
}

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

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.pulse-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-info {
    display: flex;
    flex-direction: column;
}

#status-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.mode-tag {
    font-size: 0.6rem;
    color: var(--primary-purple);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}
.icon-btn svg {
    width: 20px;
    height: 20px;
}

.danger-icon:hover {
    color: var(--danger);
}

.transfer-log {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    padding-bottom: 90px; /* Space for FAB */
}

.empty-state {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    color: var(--primary-purple);
    opacity: 0.7;
    margin-bottom: 0.8rem;
}
.empty-icon svg {
    width: 48px;
    height: 48px;
}

.empty-state h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}
.empty-state p {
    font-size: 0.85rem;
}

.fab-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 40;
}

#file-input {
    display: none;
}

button:disabled {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(100%);
}

.fab {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fab svg { width: 30px; height: 30px; }
.fab:active {
    transform: scale(0.92);
}

/* Drag and Drop Overlay for PC / Desktop View */
.drag-drop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    border: 4px dashed var(--accent);
    box-sizing: border-box;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drag-drop-overlay.active {
    display: flex;
    animation: fadeIn 0.25s ease-out;
}

.drag-drop-content {
    text-align: center;
    padding: 3.5rem 4rem;
    max-width: 480px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 60px rgba(14, 165, 233, 0.25), 0 0 40px rgba(14, 165, 233, 0.15);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 255, 0.9));
    transform: scale(1);
}

.drag-drop-content svg {
    width: 72px;
    height: 72px;
    color: var(--accent);
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 8px 16px rgba(14, 165, 233, 0.4));
    animation: bounce 1.5s infinite;
}

.drag-drop-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.drag-drop-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* Chat Bubbles */
.transfer-bubble {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    animation: slide-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.transfer-bubble.sent {
    align-self: flex-end;
}

.transfer-bubble.recv {
    align-self: flex-start;
}

.bubble-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    margin-bottom: 3px;
    color: var(--text-muted);
    padding: 0 4px;
}

.bubble-content {
    background: white;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    padding: 0.8rem;
    border-radius: 14px;
    border-top-right-radius: 4px; /* Default for sent */
}
.transfer-bubble.recv .bubble-content {
    border-top-right-radius: 14px;
    border-top-left-radius: 4px;
    background: rgba(248, 250, 252, 0.8);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.file-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.file-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.progress-container {
    height: 4px;
    background: rgba(0,0,0,0.04);
    border-radius: 2px;
    margin-top: 0.6rem;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    transition: width 0.1s linear;
}

.bubble-actions {
    margin-top: 0.6rem;
}

.download-btn {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--text-main);
    padding: 0.65rem 1.1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    width: 100%;
}

.image-preview {
    width: 100%;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    margin-top: 0.6rem;
    cursor: pointer;
    background: rgba(0,0,0,0.02);
}

/* Animations */
@keyframes slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pop-in {
    animation: pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.bounce {
    animation: bounce 2s infinite ease-in-out;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}



/* Spinner */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0,0,0,0.05);
    border-top-color: var(--primary-neon);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#processing-text {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

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

/* Utilities */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

/* Custom Dialog UI */
#custom-dialog-overlay {
    z-index: 250;
    align-items: center;
    justify-content: center;
}
.dialog-panel {
    margin: auto;
    width: 90%;
    max-width: 360px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
#custom-dialog-title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
#custom-dialog-message {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}
.dialog-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}
.dialog-actions button {
    flex: 1;
    padding: 0.95rem;
    border-radius: 12px;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
}
#btn-dialog-cancel {
    color: var(--text-main);
}
#btn-dialog-confirm {
    color: white;
}
