@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700;800&family=Scheherazade+New:wght@400;600;700&family=Noto+Naskh+Arabic:wght@400;600;700&display=swap');

:root {
    --bg-dark: #020c08;
    --card-dark: #061c14;
    --card-border: #0e3f30;
    --gold: #d4af37;
    --gold-light: #fbe69b;
    --emerald-accent: #10b981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: #f1f5f9;
    overflow-x: hidden;
}

.font-amiri {
    font-family: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', serif;
}

.font-urdu {
    font-family: 'Scheherazade New', 'Amiri', 'Noto Naskh Arabic', serif;
    line-height: 1.8;
}

.font-arabic-num {
    font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Amiri', serif;
}

/* Islamic Geometric Border Patterns & Accents */
.islamic-card {
    background: linear-gradient(135deg, rgba(6, 28, 20, 0.96) 0%, rgba(2, 12, 8, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(212, 175, 55, 0.05);
}

.gold-gradient-text {
    background: linear-gradient(135deg, #fce084 0%, #d4af37 50%, #aa8420 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.emerald-gradient-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.35);
    transition: all 0.2s ease-in-out;
}

.emerald-gradient-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.gold-gradient-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.35);
    transition: all 0.2s ease-in-out;
}

.gold-gradient-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5);
}

/* ========================================================
   AUTHENTIC SCREENSHOT-33 STYLE NAQSH GRID SYSTEM
   ======================================================== */

.naqsh-card-wrapper {
    background: #0b1522;
    border: 1px solid rgba(30, 58, 95, 0.7);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
}

.naqsh-card-header {
    border-left: 4px solid #f59e0b;
    background: rgba(15, 23, 42, 0.85);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(30, 58, 95, 0.5);
}

/* Grid Layouts using CSS Grid (Never stacks vertically!) */
.naqsh-css-grid {
    display: grid;
    gap: 8px;
    width: 100%;
    margin: 1rem auto;
}

.naqsh-css-grid.grid-3x3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.naqsh-css-grid.grid-4x4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.naqsh-css-grid.grid-5x5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Individual Naqsh Box (Matching Screenshot 33 Exactly) */
.naqsh-box-tile {
    position: relative;
    background: #08111d;
    border: 1.5px solid rgba(30, 64, 110, 0.85);
    border-radius: 0.65rem;
    padding: 1.35rem 0.5rem 0.85rem 0.5rem;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.naqsh-box-tile:hover {
    border-color: #38bdf8;
    background: #0d1b2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

/* Corner English Step Badge (#1, #15, #14 etc) */
.naqsh-corner-step {
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: #38bdf8;
    letter-spacing: -0.2px;
    background: rgba(14, 165, 233, 0.12);
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Center Authentic Arabic/Urdu Numeral (Gold) */
.naqsh-center-arabic {
    font-family: 'Noto Naskh Arabic', 'Scheherazade New', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1.2;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
    margin: 4px 0 2px 0;
}

/* Bottom-Right English Number Subtitle */
.naqsh-bottom-english {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    font-family: 'Inter', monospace;
    color: #94a3b8;
    font-weight: 600;
}

/* Chaal Step Interactive States */
.naqsh-box-tile.step-active {
    border-color: #38bdf8 !important;
    background: rgba(14, 165, 233, 0.25) !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6) !important;
    transform: scale(1.05);
}

.naqsh-box-tile.step-completed {
    border-color: rgba(16, 185, 129, 0.7);
    background: rgba(6, 78, 59, 0.25);
}

.naqsh-box-tile.step-hidden .naqsh-center-arabic,
.naqsh-box-tile.step-hidden .naqsh-bottom-english {
    opacity: 0.1;
    filter: blur(2px);
}

/* Stepper Bottom Controls */
.chaal-controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: rgba(10, 19, 31, 0.9);
    border-top: 1px solid rgba(30, 58, 95, 0.5);
}

.btn-chaal-step {
    padding: 0.45rem 0.9rem;
    border-radius: 0.5rem;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #020c08;
}
::-webkit-scrollbar-thumb {
    background: #0e3f30;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}
