/* ============================================
   تمام استایل‌ها با پیشوند mach- و رنگ‌های ثابت
   ============================================ */

.mach-popup-system {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    direction: rtl;
}

/* ============================================
   HEADER
   ============================================ */
.mach-app-header {
    background: linear-gradient(135deg, #0a1f14, #163e2c);
    border-radius: 16px;
    padding: 28px 36px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(22,62,44,0.12);
    position: relative;
}

.mach-app-header h1 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.mach-app-header h1 .mach-gold {
    color: #c9a03d;
}

.mach-app-header .mach-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-top: 4px;
}

.mach-sound-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.mach-sound-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    padding: 6px 16px;
    border-radius: 100px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: 'Vazir', 'Tahoma', sans-serif;
}

.mach-sound-badge:hover {
    background: rgba(255,255,255,0.14);
}

.mach-sound-badge .mach-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fc8181;
    display: inline-block;
    transition: all 0.3s;
}

.mach-sound-badge .mach-dot.mach-active {
    background: #48bb78;
}

.mach-sound-badge .mach-dot.mach-muted {
    background: #fc8181;
}

.mach-activate-sound-btn {
    background: #c9a03d;
    color: #ffffff;
    border: none;
    padding: 6px 18px;
    border-radius: 100px;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    animation: mach-pulse 2s infinite;
}

.mach-activate-sound-btn:hover {
    background: #a8832e;
    transform: scale(1.05);
}

.mach-activate-sound-btn.mach-hidden {
    display: none;
}

@keyframes mach-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   INFO
   ============================================ */
.mach-info-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 24px;
    border-right: 4px solid #c9a03d;
    box-shadow: 0 2px 12px rgba(22,62,44,0.06);
    font-size: 13px;
    color: #4a5a4e;
}

.mach-info-box strong {
    color: #1a2e1e;
}

.mach-info-box .mach-highlight {
    color: #c9a03d;
    font-weight: 600;
}

/* ============================================
   BUTTONS
   ============================================ */
.mach-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.mach-btn-test {
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(22,62,44,0.06);
}

.mach-btn-test:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(22,62,44,0.12);
}

.mach-btn-test:active {
    transform: scale(0.96);
}

.mach-btn-test.mach-primary {
    background: linear-gradient(135deg, #0a1f14, #163e2c);
}

.mach-btn-test.mach-gold {
    background: linear-gradient(135deg, #c9a03d, #a8832e);
}

.mach-btn-test.mach-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.mach-page-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    border: 1px solid #e8ece9;
    box-shadow: 0 2px 12px rgba(22,62,44,0.06);
    max-width: 700px;
    margin: 0 auto;
}

.mach-page-content h2 {
    color: #1a2e1e;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.mach-page-content p {
    color: #4a5a4e;
    font-size: 14px;
    margin-top: 6px;
}

.mach-page-content .mach-divider {
    width: 50px;
    height: 3px;
    background: #c9a03d;
    margin: 10px auto;
    border-radius: 3px;
}

/* ============================================
   پاپ‌اپ ۱: مودال (Modal)
   ============================================ */
.mach-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10,31,20,0.5);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.mach-modal-overlay.mach-active {
    display: flex;
}

.mach-modal-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(22,62,44,0.18);
    animation: mach-scaleUp 0.3s ease;
}

@keyframes mach-scaleUp {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.mach-modal-box .mach-m-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2e1e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mach-modal-box .mach-m-text {
    font-size: 14px;
    color: #4a5a4e;
    line-height: 1.8;
    margin-bottom: 16px;
}

.mach-modal-box .mach-m-text .mach-gold-text {
    color: #c9a03d;
    font-weight: 600;
}

.mach-modal-box .mach-m-code {
    background: #fdf6e8;
    border-radius: 10px;
    padding: 10px 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #a8832e;
    margin-bottom: 16px;
    border: 1px dashed #c9a03d;
}

.mach-modal-box .mach-m-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mach-modal-box .mach-m-btns button {
    padding: 8px 22px;
    border: none;
    border-radius: 100px;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mach-modal-box .mach-m-btns .mach-btn-primary {
    background: #0a1f14;
    color: #ffffff;
}

.mach-modal-box .mach-m-btns .mach-btn-primary:hover {
    background: #163e2c;
}

.mach-modal-box .mach-m-btns .mach-btn-outline {
    background: transparent;
    color: #4a5a4e;
    border: 1.5px solid #e8ece9;
}

.mach-modal-box .mach-m-btns .mach-btn-outline:hover {
    border-color: #c9a03d;
    color: #c9a03d;
}

/* ============================================
   پاپ‌اپ ۲: اطلاعیه (Notification)
   ============================================ */
.mach-notification {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(22,62,44,0.12);
    border: 1px solid #e8ece9;
    border-right: 4px solid #c9a03d;
    display: none;
    z-index: 10000000;

}

.mach-notification.mach-active {
    display: block;
    animation: mach-slideUp 0.35s ease;
}

@keyframes mach-slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.mach-notification .mach-n-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mach-notification .mach-n-title {
    font-weight: 700;
    font-size: 14px;
    color: #1a2e1e;
}

.mach-notification .mach-n-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #7d8f84;
    padding: 4px;
}

.mach-notification .mach-n-close:hover {
    color: #1a2e1e;
}

.mach-notification .mach-n-text {
    font-size: 13px;
    color: #4a5a4e;
    margin: 4px 0 12px;
}

.mach-notification .mach-n-footer {
    display: flex;
    gap: 8px;
}

.mach-notification .mach-n-footer button {
    padding: 6px 18px;
    border: none;
    border-radius: 100px;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mach-notification .mach-n-footer .mach-btn-gold {
    background: #c9a03d;
    color: #ffffff;
}

.mach-notification .mach-n-footer .mach-btn-gold:hover {
    background: #a8832e;
}

.mach-notification .mach-n-footer .mach-btn-text {
    background: transparent;
    color: #7d8f84;
}

.mach-notification .mach-n-footer .mach-btn-text:hover {
    color: #1a2e1e;
}

/* ============================================
   پاپ‌اپ ۳: بنر (Banner)
   ============================================ */
.mach-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0a1f14;
    padding: 12px 24px;
    display: none;
    z-index: 1000;
    border-bottom: 2px solid #c9a03d;
    box-shadow: 0 8px 32px rgba(22,62,44,0.12);
}

.mach-banner.mach-active {
    display: block;
    animation: mach-slideDown 0.35s ease;
}

@keyframes mach-slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.mach-banner .mach-b-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mach-banner .mach-b-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.mach-banner .mach-b-text small {
    font-weight: 300;
    opacity: 0.7;
}

.mach-banner .mach-b-btns {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mach-banner .mach-b-btns button {
    padding: 6px 18px;
    border: none;
    border-radius: 100px;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mach-banner .mach-b-btns .mach-btn-gold {
    background: #c9a03d;
    color: #ffffff;
}

.mach-banner .mach-b-btns .mach-btn-gold:hover {
    background: #a8832e;
}

.mach-banner .mach-b-btns .mach-btn-close {
    background: transparent;
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    padding: 4px 8px;
}

.mach-banner .mach-b-btns .mach-btn-close:hover {
    color: #ffffff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .mach-app-header { padding: 20px; }
    .mach-app-header h1 { font-size: 20px; }
    .mach-modal-box { padding: 24px; }
    .mach-modal-box .mach-m-btns { flex-direction: column; }
    .mach-modal-box .mach-m-btns button { width: 100%; justify-content: center; }
    .mach-notification { left: 16px; right: 16px; bottom: 16px; max-width: 100%; }
    .mach-banner .mach-b-inner { flex-direction: column; text-align: center; }
    .mach-page-content { padding: 24px; }
    .mach-sound-controls { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .mach-btn-group { gap: 8px; }
    .mach-btn-test { font-size: 12px; padding: 8px 14px; flex: 1; justify-content: center; }
}