/* ============================================================
   APP LAYOUT CSS — Xiyan Premium Mobile App
   Extracted from app.blade.php for clean separation of concerns
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    /* Metallic Steel-Blue & Gold Theme */
    --primary-solid: #10273a;
    --primary-dark: #081622;
    --primary-light: #ffeaa3;

    /* Accent Colors */
    --accent-cyan: #38bdf8;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-amber: #d4af37;
    --accent-rose: #ef4444;

    /* UI Colors */
    --secondary: #e2e8f0;
    --bg-color: radial-gradient(circle at center, #cce0eb 0%, #a2c2d6 100%);
    --card-bg: linear-gradient(135deg, #10273a 0%, #1d3f5c 45%, #132a3f 75%, #081622 100%);
    --text-color: #0f172a;
    --text-muted: #cbd5e1;
    --border-color: rgba(255, 255, 255, 0.28);

    /* Glassmorphism */
    --glass-bg: rgba(16, 39, 58, 0.85);
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-shadow: 0 12px 32px 0 rgba(8, 20, 32, 0.45);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(8, 20, 32, 0.1);
    --shadow-md: 0 10px 25px rgba(8, 20, 32, 0.25);
    --shadow-lg: 0 20px 48px rgba(8, 20, 32, 0.4);
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.2);

    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --font-bengali: 'Noto Sans Bengali', sans-serif;
}

/* ---- Global Reset & Base ---- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', 'Inter', 'Noto Sans Bengali', sans-serif;
    background: #0b284d url('https://img.magnific.com/premium-photo/gradient-electric-navy-abstract-creative-background-design_851755-315032.jpg?semt=ais_hybrid&w=740&q=80') no-repeat center center fixed !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    color: #ffffff !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(11, 40, 77, 0.15) !important;
    z-index: 0;
    pointer-events: none;
}

body > * {
    position: relative;
    z-index: 1;
}

/* ---- App Container ---- */
.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    background: transparent;
    padding-bottom: 80px;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ---- Global Mobile Fixes ---- */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

input, select, textarea {
    max-width: 100%;
    box-sizing: border-box;
}

p, h1, h2, h3, h4, h5, h6, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ---- Helper Classes ---- */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.w-full        { width: 100%; }
.text-center   { text-align: center; }
.font-bold     { font-weight: 700; }
.text-primary  { color: var(--accent-cyan); }
.text-sm       { font-size: 0.875rem; }
.text-xs       { font-size: 0.75rem; }
.mt-2          { margin-top: 0.5rem; }

/* ---- Header (Hidden by default, shown on specific pages) ---- */
.header {
    display: none !important;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo img {
    height: 30px;
}

/* ---- Bottom Nav (Glassmorphism - Legacy) ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 8px 16px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    position: relative;
    padding: 8px 4px;
    border-radius: 12px;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-radius: 0 0 4px 4px;
    transition: transform 0.3s ease;
}

.nav-link.active::before { transform: translateX(-50%) scaleX(1); }
.nav-link.active { color: #06b6d4; background: rgba(6, 182, 212, 0.08); }
.nav-link:active  { transform: scale(0.95); }

.nav-link i {
    font-size: 22px;
    transition: transform 0.3s ease;
}

.nav-link.active i { transform: translateY(-2px); }

/* ---- Custom Bottom Nav (SVG Metallic) ---- */
.custom-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.nav-bg-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.custom-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
    position: relative;
    z-index: 1;
    padding: 8px 4px;
    transition: all 0.2s ease;
    height: 100%;
}

.custom-nav-link.active i,
.custom-nav-link.active span {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.custom-nav-link.inactive i,
.custom-nav-link.inactive span {
    color: #1a3a5c;
}

.custom-nav-link i {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.custom-nav-link.active i {
    transform: translateY(-2px);
}

.custom-nav-link span {
    font-size: 9px;
    letter-spacing: 0.3px;
}

.custom-nav-link:active { transform: scale(0.92); }

/* ---- Island Navbar (Alternative Premium Metallic) ---- */
.island-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: linear-gradient(to bottom, #f8fafc 0%, #e2e8f0 35%, #cbd5e1 70%, #94a3b8 100%);
    border-top: 2px solid #ffffff;
    border-bottom: 2px solid #94a3b8;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -5px 25px rgba(13, 33, 52, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding-bottom: env(safe-area-inset-bottom);
}

.i-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #0f2c59;
    transition: all 0.2s ease;
    position: relative;
    padding: 4px 0;
    height: 100%;
    justify-content: center;
}

.i-nav-link i   { font-size: 20px; color: #0f2c59; transition: all 0.2s ease; }
.i-nav-link span { font-size: 10px; font-weight: 850; color: #0f2c59; transition: all 0.2s; }

.i-nav-link.active {
    background: radial-gradient(circle at center, #3b8dcf 0%, #185085 100%);
    border-radius: 10px;
    margin: 4px;
    height: calc(100% - 8px);
    box-shadow: 0 4px 10px rgba(24, 80, 133, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.i-nav-link.active i    { color: #ffffff; transform: scale(0.95); }
.i-nav-link.active span { color: #ffffff; font-weight: 900; }
.i-nav-link.active::after { display: none; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before { width: 300px; height: 300px; }

.btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(6, 182, 212, 0.6);
    transform: translateY(-2px);
}

.btn-primary:active { transform: translateY(0); }

/* ---- Balance Display ---- */
.balance-display {
    background: rgba(84, 160, 216, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    border: 1px solid rgba(84, 160, 216, 0.3);
}

.balance-amount {
    font-weight: 700;
    color: #06b6d4;
    font-size: 14px;
}

/* ---- Notifications ---- */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 440px;
    padding: 18px 20px;
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    z-index: 9999;
    animation: slideDownBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
}

@keyframes slideDownBounce {
    0%   { transform: translateX(-50%) translateY(-100px); opacity: 0; }
    70%  { transform: translateX(-50%) translateY(10px); }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

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

.success-notification {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.error-notification {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.notification i            { font-size: 26px; color: white; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); }
.notification-content      { flex: 1; }
.notification-title        { font-weight: 700; font-size: 16px; color: white; margin-bottom: 4px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.notification-message      { font-size: 14px; color: rgba(255, 255, 255, 0.95); line-height: 1.5; }

/* ---- Turbo Progress Bar ---- */
.turbo-progress-bar {
    background: linear-gradient(90deg, #54a0d8, #2a5a8a);
    height: 3px;
    box-shadow: 0 2px 10px rgba(84, 160, 216, 0.5);
    z-index: 9999;
}

/* ---- Copy Modal ---- */
.custom-copy-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.copy-modal-content {
    background: #2b2b2b;
    width: 85%;
    max-width: 320px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: popIn 0.2s ease-out;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.copy-modal-text {
    color: #ffffff;
    font-size: 15px;
    margin-bottom: 15px;
    word-break: break-all;
    text-align: left;
    line-height: 1.4;
    font-weight: 400;
}

.copy-modal-subtext {
    color: #e0e0e0;
    font-size: 17px;
    margin-bottom: 30px;
    text-align: left;
}

.copy-modal-action {
    color: #ff5252;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    align-self: flex-end;
    padding: 5px 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.copy-modal-action:active { background: rgba(211, 47, 47, 0.1); }

@keyframes popIn {
    0%   { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}
