
/* Enhanced styles for TabeerIQ - Islamic Dream Interpretation */
.btn-pulse {
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.processing {
    opacity: 0.7;
    pointer-events: none;
}

/* Enhanced Video Ad Styles with Universal Text Visibility */
.video-ad-container {
    position: relative;
    background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(30,41,59,0.98));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 2px solid rgba(148,163,184,0.2);
}

.video-ad-container .ad-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.95)) !important;
    padding: 20px;
    z-index: 5;
    backdrop-filter: blur(8px);
}

.video-ad-container .ad-title {
    color: #ffffff !important;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.8);
    font-weight: 700;
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.2;
    background: rgba(0,0,0,0.7);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
}

.video-ad-container .ad-description {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.8);
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.6);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.ad-video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.video-play-button:hover {
    background: rgba(0,0,0,0.9);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.video-controls-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.video-control-btn {
    background: rgba(0,0,0,0.7);
    border: 1px solid #fff;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.video-control-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.continue-after-ad:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Image Ad Styles with Superior Text Visibility */
.image-ad-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(148,163,184,0.1);
}

.image-ad-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-color: rgba(23,162,184,0.5);
}

.image-ad-container .ad-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.95)) !important;
    padding: 18px;
    color: white;
    backdrop-filter: blur(5px);
}

.image-ad-container .ad-title {
    color: #ffffff !important;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.8);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1.2em;
    background: rgba(0,0,0,0.7);
    padding: 6px 10px;
    border-radius: 5px;
    border-left: 3px solid #17a2b8;
}

.image-ad-container .ad-description {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.8);
    font-size: 0.95em;
    line-height: 1.4;
    background: rgba(0,0,0,0.6);
    padding: 6px 10px;
    border-radius: 5px;
    font-weight: 500;
}

/* Universal Ad Text Enhancement for All Containers */
.ad-container .ad-title,
.ad-container .ad-description,
[data-ad-id] .ad-title,
[data-ad-id] .ad-description {
    color: #ffffff !important;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.8) !important;
    background: rgba(0,0,0,0.7) !important;
    padding: 6px 10px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    margin: 4px 0 !important;
}

.ad-container .ad-title,
[data-ad-id] .ad-title {
    border-left: 3px solid #17a2b8 !important;
    font-size: 1.1em !important;
}

.ad-container .ad-description,
[data-ad-id] .ad-description {
    font-size: 0.9em !important;
    border-left: 2px solid rgba(23,162,184,0.5) !important;
}

/* Elegant Professional Navigation */
.header-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    backdrop-filter: blur(12px);
    position: relative;
}

.header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #17a2b8, transparent);
    opacity: 0.6;
}

.navbar-brand {
    transition: all 0.3s ease;
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.navbar-brand:hover {
    transform: translateY(-1px);
    color: #0ea5e9 !important;
    text-shadow: 0 2px 12px rgba(14, 165, 233, 0.4);
}

.brand-icon {
    font-size: 1.4rem;
    color: #0ea5e9;
    filter: drop-shadow(0 2px 6px rgba(14, 165, 233, 0.5));
    margin-right: 8px;
    animation: subtle-glow 3s ease-in-out infinite alternate;
}

@keyframes subtle-glow {
    from { filter: drop-shadow(0 2px 6px rgba(14, 165, 233, 0.5)); }
    to { filter: drop-shadow(0 2px 10px rgba(14, 165, 233, 0.7)); }
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 4px;
    padding: 8px 16px !important;
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(14, 165, 233, 0.12);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Elegant User Dropdown */
.user-dropdown {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.dropdown-item-hover {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.dropdown-item-hover:hover {
    background: rgba(14, 165, 233, 0.15) !important;
    transform: translateX(5px);
    border-left: 3px solid #0ea5e9;
}

.stats-container {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Professional Subscription Badge */
.badge {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Elegant Professional Badge Colors */
.badge.bg-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #1f2937 !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
}

.badge.bg-dark {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
    color: #ffffff !important;
}

/* Professional Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(26, 26, 46, 0.98);
        border-radius: 12px;
        margin-top: 10px;
        padding: 20px;
        border: 1px solid rgba(23, 162, 184, 0.2);
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        backdrop-filter: blur(15px);
    }
    
    .nav-link {
        padding: 12px 16px !important;
        margin: 4px 0;
        border-radius: 8px;
        background: rgba(255,255,255,0.05);
    }
    
    .user-dropdown {
        position: relative !important;
        margin-top: 10px;
        transform: none !important;
        border: none;
        box-shadow: none;
    }
    
    .badge {
        font-size: 0.8rem;
    }
    
    .brand-text span {
        font-size: 1.1rem;
    }
    
    .brand-text small {
        font-size: 0.6rem !important;
    }
}

/* Professional Header Enhancement */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

/* Add subtle shadow on scroll */
@media (min-width: 992px) {
    .mobile-header.scrolled {
        box-shadow: 0 4px 30px rgba(0,0,0,0.25);
    }
}

/* Mobile header optimization */
@media (max-width: 991.98px) {
    .mobile-header {
        padding: 12px 0;
    }
    
    /* Ensure mobile content scrolls properly */
    body {
        overflow-x: hidden;
        position: relative;
    }
    
    /* Fix mobile viewport issues */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Professional mobile navbar toggler */
    .navbar-toggler {
        border: 1px solid rgba(23, 162, 184, 0.3);
        border-radius: 8px;
        padding: 6px 10px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
        border-color: #17a2b8;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2823, 162, 184, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* Button Enhancements */
.btn-sm {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Loading State for Navigation Links */
.nav-link.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Islamic Design Elements */
.text-glow {
    text-shadow: 0 0 10px rgba(23, 162, 184, 0.5);
}

/* Responsive Text Adjustments */
@media (max-width: 576px) {
    .nav-text {
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .user-dropdown {
        min-width: 95vw !important;
        left: 2.5vw !important;
    }
}
        