:root {
    --primary: #6d28d9;
    --primary-light: #8b5cf6;
    --primary-dark: #5b21b6;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e1b4b;
    --darker: #0f0a2e;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gradient: linear-gradient(135deg, #6d28d9 0%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --shadow: 0 10px 40px rgba(109, 40, 217, 0.15);
    --shadow-lg: 0 25px 60px rgba(109, 40, 217, 0.25);
    --radius: 20px;
    --radius-sm: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== Animated Background ===== */
.bg-shapes {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-shapes::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.12) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

.bg-shapes::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    border-radius: 50%;
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* ===== Header / Navbar ===== */
header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 800;
    font-size: 1.5rem;
}

.logo-icon img {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text span:first-child {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text small {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gray);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(109, 40, 217, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 14px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary-menu {
    background: var(--gradient);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
}

.btn-primary-menu:hover {
    transform: translateY(-2px);
    color: blue !important;
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.4);
}

.btn-primary {
    background: var(--gradient);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.05rem;
    border-radius: 16px;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    padding: 160px 0 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
}

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

.hero-text p {
    font-size: 1.15rem;
    color: var(--gray);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(109, 40, 217, 0.08);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(109, 40, 217, 0.15);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ===== Tracking Form ===== */
.tracking-card {
    background: white;
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(109, 40, 217, 0.08);
}

.tracking-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: var(--gradient);
}

.tracking-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tracking-card h3 .icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.tracking-card > p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-light);
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--light);
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1);
}

.form-control::placeholder {
    color: #94a3b8;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 44px;
}

.tracking-card .btn {
    width: 100%;
    margin-top: 8px;
}

/* ===== Couriers Section ===== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header .badge {
    display: inline-block;
    background: rgba(109, 40, 217, 0.08);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--gray);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.couriers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.courier-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.courier-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.courier-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.courier-card:hover::after {
    transform: scaleX(1);
}

.courier-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    transition: transform 0.4s ease;
}

.courier-icon-new img {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    transition: transform 0.4s ease;
}

.courier-card:hover .courier-icon {
    transform: scale(1.1) rotate(-5deg);
}

.courier-icon-new:hover img {
    transform: scale(1.1) rotate(-5deg);
}

.courier-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.courier-card p {
    font-size: 0.85rem;
    color: var(--gray);
}

.courier-post { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.courier-tipax { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.courier-mahex { background: linear-gradient(135deg, #10b981, #059669); }
.courier-chapar { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

/* ===== Features Section ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    background: white;
    border-radius: var(--radius);
    padding: 36px 28px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.25);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.8;
}

/* ===== Apps Section ===== */
.apps-section {
    background: var(--darker);
    border-radius: 40px;
    padding: 70px 60px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
    color: white;
}

.apps-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.apps-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.apps-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.apps-text h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.apps-text p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    font-size: 1rem;
}

.apps-buttons img {
    width: 200px;
}

.app-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.app-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.25);
}

.app-btn .app-icon {
    font-size: 1.5rem;
}

.app-btn .app-text small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.6;
}

.app-btn .app-text span {
    font-weight: 700;
    font-size: 0.95rem;
}

.apps-visual {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.phone-mockup {
    width: 200px;
    height: 380px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.phone-screen {
    position: absolute;
    inset: 30px 12px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    padding: 16px;
}

.phone-screen .line {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
}

.phone-screen .line.short { width: 60%; }
.phone-screen .line.medium { width: 80%; }

.phone-screen .circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    margin: 20px auto;
    opacity: 0.6;
}

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-item .number {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item .label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
}

/* ===== Footer ===== */
footer {
    background: var(--darker);
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 16px;
    max-width: 300px;
}

.footer-brand .logo {
    color: white;
}

.footer-brand .logo-text small {
    color: rgba(255, 255, 255, 0.4);
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .couriers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .apps-content {
        grid-template-columns: 1fr;
    }
    .apps-visual {
        display: none;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 24px;
        left: 24px;
        background: white;
        border-radius: 20px;
        padding: 20px;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        border: 1px solid rgba(109, 40, 217, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
    }

    .nav-links .btn {
        width: 100%;
        margin-top: 8px;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 130px 0 60px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .tracking-card {
        padding: 28px 24px;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .couriers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .apps-section {
        padding: 40px 24px;
        border-radius: 28px;
    }

    .apps-text h2 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-text h1 {
        font-size: 1.7rem;
    }

    .couriers-grid {
        grid-template-columns: 1fr;
    }

    .courier-card {
        display: flex;
        align-items: center;
        text-align: right;
        gap: 16px;
        padding: 20px;
    }

    .courier-icon {
        margin: 0;
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
        flex-shrink: 0;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 0.95rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Result Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 46, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 28px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 20px;
}

.modal h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* ===== Scroll to top ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-4px);
}

/* ===== Iframe Fullscreen Overlay ===== */
.iframe-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.iframe-overlay.active {
    opacity: 1;
    visibility: visible;
}

.iframe-header {
    height: 60px;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    z-index: 10;
}

.iframe-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 700;
}

.iframe-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
    flex-shrink: 0;
}

.iframe-title-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.iframe-close {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.iframe-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.iframe-close:active {
    transform: scale(0.95);
}

.iframe-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

.tracking-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: white;
}

/* ===== Iframe Loading ===== */
.iframe-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #f8fafc;
    z-index: 5;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.iframe-loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.iframe-loading p {
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 600;
}

.iframe-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@media (max-width: 600px) {
    .iframe-header {
        height: 54px;
        padding: 0 16px;
    }
    
    .iframe-title {
        font-size: 0.85rem;
    }
    
    .iframe-close {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }
}