/* ========================================================== */
/* Home Page Styles                                           */
/* ========================================================== */

.home-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #0f172a;
    color: #f8fafc;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0;
    margin: 0;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    box-sizing: border-box;
}

.brand-logo {
    display: flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 700;
    gap: 10px;
    height: auto;
    min-height: 44px;
}

.brand-logo img,
.brand-logo-img {
    height: 44px !important;
    max-height: 46px !important;
    max-width: 180px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    transition: transform 0.2s ease;
}

.brand-logo .bi {
    color: #3b82f6;
    font-size: 1.45rem;
}

.brand-text-blue {
    color: #3b82f6;
}

.brand-text-slate {
    color: #e2e8f0;
}

.map-link-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.map-link-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
}

.home-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.offline-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.offline-banner.hidden {
    display: none !important;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    width: 100%;
}

.hero-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.glow-ring {
    position: absolute;
    border-radius: 50%;
    background: #3b82f6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.outer-ring {
    width: 120px;
    height: 120px;
    opacity: 0.1;
    animation: pulse-ring 3s infinite;
}

.inner-ring {
    width: 90px;
    height: 90px;
    opacity: 0.2;
    animation: pulse-ring 3s infinite 0.5s;
}

.icon-circle {
    position: relative;
    width: 64px;
    height: 64px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.icon-circle .bi {
    color: white;
    font-size: 1.8rem;
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.5;
    max-width: 90%;
}

/* Action Section */
.action-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.btn-scan-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 100px;
    padding: 16px 32px;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 320px;
    justify-content: center;
}

.btn-scan-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.btn-scan-primary:active {
    transform: translateY(1px);
}

.action-helper {
    margin-top: 16px;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Process Section */
.process-section {
    width: 100%;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
}

.process-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.process-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.step-icon {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 1.5rem;
}

.step-text {
    font-size: 0.75rem;
    color: #cbd5e1;
    line-height: 1.4;
    font-weight: 500;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    color: #475569;
    font-size: 1rem;
    padding: 0 4px;
}

.return-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    padding: 12px 16px;
    border-radius: 12px;
    color: #4ade80;
    font-size: 0.85rem;
    text-align: left;
    line-height: 1.4;
}

.notice-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Footer Section */
.home-footer {
    padding: 32px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.contact-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    width: 100%;
}

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    min-width: 180px;
}

.btn-contact:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-phone .bi {
    color: #60a5fa;
}

.footer-credits {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
}

.dev-link {
    margin-top: 8px;
}

.dev-link a {
    color: #94a3b8;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.dev-link a:hover {
    color: #e2e8f0;
}

@media (max-width: 400px) {
    .process-row {
        gap: 8px;
    }
    
    .step-text {
        font-size: 0.65rem;
    }
}

@media (min-width: 768px) {
    .home-header {
        padding: 16px 28px;
    }

    .brand-logo {
        font-size: 1.55rem;
        min-height: 52px;
        gap: 12px;
    }

    .brand-logo img,
    .brand-logo-img {
        height: 52px !important;
        max-height: 54px !important;
        max-width: 230px !important;
    }

    .brand-logo .bi {
        font-size: 1.65rem;
    }

    .scanner-header-new .brand img,
    .scanner-header-new .brand .brand-logo-img {
        height: 46px !important;
        max-height: 48px !important;
        max-width: 200px !important;
    }
}

/* ========================================================== */
/* Scanner Overlay Styles (Consistent Dark Glassmorphism)     */
/* ========================================================== */

#scanner-overlay,
.scanner-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    z-index: 9999 !important;
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    color: #f8fafc !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#scanner-overlay.active,
.scanner-overlay.active {
    display: flex !important;
}

.scanner-header-new {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 24px !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(15, 23, 42, 0.9) !important;
    box-sizing: border-box !important;
}

.scanner-header-new .brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    height: auto !important;
    min-height: 40px !important;
}

.scanner-header-new .brand img,
.scanner-header-new .brand .brand-logo-img {
    height: 40px !important;
    max-height: 42px !important;
    max-width: 170px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.scanner-header-new .brand .bi {
    font-size: 1.4rem !important;
    color: #3b82f6 !important;
}

.scanner-header-new .brand-text {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
}

.scanner-header-new .close-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.scanner-header-new .close-btn:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #ef4444 !important;
    transform: scale(1.05) !important;
}

.scanner-content-new {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 24px 20px 32px !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.scanner-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    margin: 4px 0 8px 0 !important;
    letter-spacing: -0.3px !important;
}

.scanner-subtitle {
    font-size: 0.92rem !important;
    color: #94a3b8 !important;
    margin-bottom: 24px !important;
    max-width: 360px !important;
    line-height: 1.45 !important;
}

.scanner-camera-wrapper {
    position: relative !important;
    width: 280px !important;
    height: 280px !important;
    max-width: 80vw !important;
    max-height: 80vw !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    margin: 0 auto 24px auto !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
    background: #020617 !important;
}

.scanner-camera-wrapper #reader {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.scanner-camera-wrapper #reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.viewfinder-bracket {
    position: absolute !important;
    width: 36px !important;
    height: 36px !important;
    border: 3.5px solid #3b82f6 !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

.bracket-tl { top: 14px; left: 14px; border-right: none !important; border-bottom: none !important; border-top-left-radius: 12px; }
.bracket-tr { top: 14px; right: 14px; border-left: none !important; border-bottom: none !important; border-top-right-radius: 12px; }
.bracket-bl { bottom: 14px; left: 14px; border-right: none !important; border-top: none !important; border-bottom-left-radius: 12px; }
.bracket-br { bottom: 14px; right: 14px; border-left: none !important; border-top: none !important; border-bottom-right-radius: 12px; }

.scanner-cancel-btn {
    margin-top: auto !important;
    margin-bottom: 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
    padding: 12px 28px !important;
    border-radius: 100px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    backdrop-filter: blur(8px) !important;
    text-decoration: none !important;
}

.scanner-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    transform: translateY(-1px) !important;
}

.scanner-footer-text {
    font-size: 0.78rem !important;
    color: #64748b !important;
    text-align: center !important;
    margin-bottom: 8px !important;
    padding: 0 10px !important;
}

.scanner-developer-credit {
    font-size: 0.72rem !important;
    color: #64748b !important;
    text-align: center !important;
    position: relative !important;
    z-index: 10 !important;
}

.scanner-developer-credit a,
.scanner-dev-link {
    color: #94a3b8 !important;
    text-decoration: underline !important;
    transition: color 0.2s ease !important;
}

.scanner-developer-credit a:hover,
.scanner-dev-link:hover {
    color: #cbd5e1 !important;
}
