/* ============================================
   QEJA — Custom Styles
   Premium dark theme overrides & animations
   ============================================ */

/* ── Smooth Scrolling ── */
html {
    scroll-behavior: smooth;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ── Selection Color ── */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
}

/* ── Glass Card Effect ── */
.glass {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ── Gradient Text ── */
.gradient-text {
    background: linear-gradient(135deg, #818cf8, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Card Hover Lift ── */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

/* ── Pulse Glow Animation ── */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.2); }
}
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ── Float Animation ── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.float {
    animation: float 3s ease-in-out infinite;
}

/* ── Fade In Up ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}
.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.fade-in-up:nth-child(3) { animation-delay: 0.15s; }
.fade-in-up:nth-child(4) { animation-delay: 0.2s; }
.fade-in-up:nth-child(5) { animation-delay: 0.25s; }
.fade-in-up:nth-child(6) { animation-delay: 0.3s; }

/* ── Slide In ── */
@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

/* ── Shimmer Loading Skeleton ── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ── Image Gallery ── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}
.photo-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}
.photo-grid img:hover {
    border-color: #6366f1;
    transform: scale(1.05);
}

/* ── Multi-step Form Progress ── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 2px solid #334155;
    color: #64748b;
    background: #0f172a;
}
.step-dot.active {
    border-color: #6366f1;
    color: #fff;
    background: #6366f1;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}
.step-dot.completed {
    border-color: #10b981;
    color: #fff;
    background: #10b981;
}
.step-line {
    width: 48px;
    height: 2px;
    background: #334155;
    transition: background 0.3s ease;
}
.step-line.active {
    background: #6366f1;
}
.step-line.completed {
    background: #10b981;
}

/* ── Form Step Panels ── */
.form-step {
    display: none;
}
.form-step.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.open .modal-content {
    transform: scale(1) translateY(0);
}

/* ── Badge ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* ── Tooltip ── */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 6px;
    border: 1px solid #334155;
}
[data-tooltip]:hover::after {
    opacity: 1;
}

/* ── Mobile Nav Slide ── */
.mobile-nav {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.mobile-nav.open {
    transform: translateX(0);
}

/* ── Listing Image ── */
.listing-img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
    border-radius: 12px 12px 0 0;
}

/* ── Input Focus Ring ── */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

/* ── Tag Chip ── */
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}
.tag-chip:hover, .tag-chip.selected {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
    color: #c7d2fe;
}

/* ── Hero gradient bg ── */
.hero-gradient {
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

/* ── Stat Card ── */
.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
}
