:root {
    --glass-bg: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.15);
    --neon: #00ffd5;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* wrapper */
.ceremony-detail-wrapper {
    max-width: 1000px;
    margin: 60px auto;
    padding: 30px;
    color: var(--text-primary);
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* header */
.ceremony-header h2 {
    font-size: 2.5rem;
    color: var(--neon);
}

.ceremony-header p {
    color: var(--text-secondary);
}

/* گروه فایل */
.file-type-group h3 {
    color: var(--neon);
    margin-bottom: 15px;
}

/* آیتم */
.file-item {
    display: flex;
    justify-content: center;
    padding: 10px;
    border-radius: 15px;
    transition: var(--transition);
}

/* hover آیتم */
.file-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,255,213,0.2);
}

/* تصویر */
.thumb-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
}

/* hover تصویر */
.thumb-img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0,255,213,0.4);
}

/* دکمه‌ها */
.file-link {
    padding: 8px 12px;
    background: linear-gradient(135deg, #00ffd5, #00d4ff);
    color: black;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    width: 180px;
    height: 40px;
    text-align: center;
    font-weight: bold;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* ripple */
.file-link::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: 0.5s;
}

.file-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,255,213,0.4);
}

.file-link:hover::before {
    width: 200px;
    height: 200px;
}

/* مودال */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.custom-modal.active {
    display: flex;
}

/* مودال محتوا */
.modal-content {
    background: rgba(20,20,20,0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

/* تصویر مودال */
#modalImage {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    object-fit: contain;
}

/* دکمه بستن */
.close,
.close-audio,
.close-image {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 26px;
    cursor: pointer;
    color: white;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
}

/* مدیا */
video, audio {
    width: 100%;
    margin-top: 10px;
}

/* fade */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
#modalVideo {
    width: auto;
    max-width: 100%;
    max-height: 70vh; /* 👈 مهم */
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}
#modalAudio {
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    display: block;
}
.close,
.close-audio,
.close-image {
    position: fixed;
    top: -25px;   /* 👈 بیشتر بالا */
    right: 20px;
    font-size: 26px;
    cursor: pointer;
    color: white;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    z-index: 100000; /* 👈 خیلی مهم */
}