/* ============================================================
   КАРТОЧКИ ДЖУМА — светлая мечеть, 3D, золотая рамка
   ============================================================ */

/* ===== Мини-карточка в коллекции ===== */
.juma-card-mini {
    background: linear-gradient(180deg, #faf6ee 0%, #f0e8d0 100%);
    border: 2px solid #d4a937;
    border-radius: 12px;
    padding: 10px 8px;
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 0 16px rgba(212, 169, 55, 0.3);
}
.juma-card-mini:active { transform: scale(0.97); }

/* 3D анимация (как легендарные из сундука) */
.juma-card-animated {
    animation: jumaFloat3d 4s ease-in-out infinite, jumaPulseGlow 3s ease-in-out infinite;
    transform-style: preserve-3d;
}
@keyframes jumaFloat3d {
    0%, 100% { transform: rotateY(-5deg) rotateX(2deg); }
    50%      { transform: rotateY(5deg) rotateX(-2deg); }
}
@keyframes jumaPulseGlow {
    0%, 100% { box-shadow: 0 0 16px rgba(212, 169, 55, 0.3); }
    50%      { box-shadow: 0 0 28px rgba(212, 169, 55, 0.6); }
}

.juma-card-badge {
    font-size: 9px;
    letter-spacing: 1px;
    font-weight: 600;
    text-align: right;
    color: #8a6818;
    z-index: 2;
    position: relative;
}

.juma-card-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.juma-card-bottom {
    text-align: center;
    z-index: 2;
    position: relative;
}

.juma-card-title {
    font-size: 11px;
    font-weight: 600;
    color: #5a3800;
    margin: 0;
}

/* Орбита золотых звёзд */
.juma-card-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}
.juma-card-orbit span {
    position: absolute;
    color: #d4a937;
    font-size: 6px;
}
.juma-card-orbit span:nth-child(1) {
    animation: jumaOrbit 6s linear infinite;
}
.juma-card-orbit span:nth-child(2) {
    animation: jumaOrbit 6s linear infinite -2s;
    font-size: 5px;
    color: #f4d03f;
}
.juma-card-orbit span:nth-child(3) {
    animation: jumaOrbit 6s linear infinite -4s;
    font-size: 7px;
    color: #c09030;
}
@keyframes jumaOrbit {
    0%   { transform: rotate(0deg) translateX(35px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(35px) rotate(-360deg); }
}

/* Заблокированная карточка Джума */
.juma-card-locked {
    filter: grayscale(0.8) brightness(0.6);
    border-color: #888 !important;
    box-shadow: none !important;
    animation: none !important;
    cursor: default;
}
.juma-card-locked .juma-card-orbit { display: none; }

/* ============================================================
   FULLSCREEN — ДЕТАЛИ КАРТОЧКИ ДЖУМА
   ============================================================ */
.juma-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.juma-detail-overlay.active { opacity: 1; }
.juma-detail-overlay.closing { opacity: 0; }

.juma-detail-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #faf6ee 0%, #f0e8d0 50%, #e8d8b0 100%);
    z-index: 0;
}

.juma-detail-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
    box-sizing: border-box;
}

.juma-detail-label {
    font-size: 12px;
    letter-spacing: 3px;
    color: #8a6818;
    font-weight: 600;
    margin: 0 0 20px;
    animation: jumaLabelDrop 0.6s ease-out;
}

.juma-detail-card {
    width: 200px;
    max-width: 60vw;
    margin: 0 0 24px;
    animation: jumaCardReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    perspective: 1000px;
}
.juma-detail-card-inner {
    background: linear-gradient(180deg, #faf6ee 0%, #f0e8d0 100%);
    border: 3px solid #d4a937;
    border-radius: 14px;
    padding: 14px 10px;
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 32px rgba(212, 169, 55, 0.5);
}

@keyframes jumaCardReveal {
    0%   { opacity: 0; transform: scale(0.3) rotateY(180deg); }
    50%  { opacity: 1; transform: scale(1.1) rotateY(0deg); }
    100% { transform: scale(1) rotateY(0deg); }
}

@keyframes jumaLabelDrop {
    0%   { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.juma-detail-name {
    font-size: 24px;
    font-weight: 700;
    color: #5a3800;
    margin: 0 0 8px;
    animation: jumaLabelDrop 0.6s ease-out 1s backwards;
}

.juma-detail-story {
    font-size: 14px;
    color: #6a4a10;
    line-height: 1.7;
    max-width: 320px;
    margin: 0 0 16px;
    animation: jumaLabelDrop 0.6s ease-out 1.2s backwards;
}

.juma-detail-ayah {
    font-family: 'Amiri', serif;
    font-size: 14px;
    color: #8a6818;
    font-style: italic;
    max-width: 300px;
    margin: 0 0 8px;
    animation: jumaLabelDrop 0.6s ease-out 1.4s backwards;
}

.juma-detail-hadith {
    font-size: 11px;
    color: #aa8a40;
    margin: 0 0 28px;
    animation: jumaLabelDrop 0.6s ease-out 1.5s backwards;
}

.juma-detail-actions {
    animation: jumaLabelDrop 0.6s ease-out 1.7s backwards;
}

.juma-detail-btn {
    background: linear-gradient(180deg, #d4a937 0%, #8b6914 100%);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(139, 105, 20, 0.4);
}
.juma-detail-btn:active { transform: scale(0.96); }

/* ===== Тёмные темы — адаптация ===== */
body[class*="dark"] .juma-detail-bg,
body[class*="night"] .juma-detail-bg,
body[class*="mecca"] .juma-detail-bg,
body[class*="medina"] .juma-detail-bg,
body[class*="emerald"] .juma-detail-bg {
    background: linear-gradient(180deg, #1a1408 0%, #2a1c0a 50%, #1a1408 100%);
}
body[class*="dark"] .juma-detail-name,
body[class*="night"] .juma-detail-name { color: #f8e878; }
body[class*="dark"] .juma-detail-story,
body[class*="night"] .juma-detail-story { color: #e0c880; }
body[class*="dark"] .juma-detail-ayah,
body[class*="night"] .juma-detail-ayah { color: #f4d03f; }
body[class*="dark"] .juma-detail-hadith,
body[class*="night"] .juma-detail-hadith { color: #c0a040; }
body[class*="dark"] .juma-detail-label,
body[class*="night"] .juma-detail-label { color: #f4d03f; }
