/*--------------------------------------------------------------
# PhyFa Core Styles v1.1.7
# Includes integrated styles for PhyFa Discuss & Player
# Added Glassmorphism effect for Discuss section + Textarea
# Formatted for Readability & Optimized
# Added Tablet Responsive Fix for Nested Replies
--------------------------------------------------------------*/

/* --- Root Variables --- */
:root {
    --phyfa-primary-color: #e65717;
    --phyfa-secondary-color: #ffcc00;
    --phyfa-background-dark: #1e1f1e;
    --phyfa-background-darker: #1b1a1b;
    --phyfa-background-light: #403d39;
    --phyfa-text-light: #fefeff;
    --phyfa-text-gray: #a0a0a0;
    --phyfa-text-dark: #1e1f1e;
    --phyfa-success-color: #4CAF50;
    --phyfa-error-color: #f44336;
    --phyfa-info-color: #2196F3;
    --phyfa-font-primary:'YekanBakhFaNum','Aparat',Tahoma, sans-serif;
    --phyfa-border-radius-small: 8px;
    --phyfa-border-radius-medium: 10px;
    --phyfa-border-radius-large: 15px;
    --phyfa-glass-bg: rgba(40, 40, 40, 0.7); /* Darker, less transparent glass */
    --phyfa-glass-bg-textarea: rgba(30, 30, 30, 0.75); /* Slightly different for textarea wrapper */
    --phyfa-glass-border: rgba(255, 255, 255, 0.1); /* Subtle white border */
    --phyfa-glass-blur: 5px; /* Slightly less blur */
    --phyfa-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    --phyfa-box-shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.2);
    --phyfa-transition-fast: 0.2s ease;
    --phyfa-transition-medium: 0.3s ease;
}


/* --- General Styles --- */
body, .phyfa-container, .phyfa-modal-content p, .phyfa-form label, .phyfa-history-date, .phyfa-detail-text, .phyfa-streak-info, input, textarea, button { font-family: var(--phyfa-font-primary); }
.phyfa-container, .phyfa-modal, .phyfa-login-streak-container, .phyfa-discuss-container, .phyfa-youtube-container { direction: rtl; text-align: right; }
.phyfa-container h1, .phyfa-container h2, .phyfa-container h3, .phyfa-container h4, .phyfa-container h5, .phyfa-container h6, .phyfa-modal-content h1, .phyfa-modal-content h2, .phyfa-modal-content h3, .phyfa-modal-content h4, .phyfa-modal-content h5, .phyfa-modal-content h6, .phyfa-modal-title { font-family: var(--phyfa-font-primary); font-weight: 600; color: var(--phyfa-text-light); margin-top: 0; margin-bottom: 0.8em; }
.phyfa-container a, .phyfa-modal-content a, .phyfa-discuss-container a, .phyfa-youtube-container a { color: var(--phyfa-primary-color); text-decoration: none; transition: color var(--phyfa-transition-fast); }
.phyfa-container a:hover, .phyfa-modal-content a:hover, .phyfa-discuss-container a:hover, .phyfa-youtube-container a:hover { color: #ff7a3a; text-decoration: none; }
.phyfa-error { background: rgba(244, 67, 54, 0.1); color: var(--phyfa-error-color); padding: 15px; border-radius: var(--phyfa-border-radius-small); border-right: 4px solid var(--phyfa-error-color); margin: 15px 0; }

/* --- Button Styles --- */
.phyfa-button {
    display: inline-block;
    padding: 10px 20px;
    font-family: var(--phyfa-font-primary);
    font-size: 0.95em;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--phyfa-border-radius-medium);
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all var(--phyfa-transition-medium);
    background-color: var(--phyfa-primary-color);
    color: var(--phyfa-text-light) !important;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
    vertical-align: middle;
    min-height: 40px; /* حداقل ارتفاع برای تضمین consistency */
}

/* متن عادی دکمه */
.phyfa-button .button-text {
    transition: visibility 0s linear var(--phyfa-transition-medium);
    visibility: visible;
    display: inline-block;
}

/* المان loading */
.phyfa-button .button-loading {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-style: italic;
    color: var(--phyfa-text-light);
    font-size: 0.9em;
    z-index: 2;
    visibility: visible !important;
}

/* حالت عادی دکمه */
.phyfa-button:hover:not(:disabled) {
    background-color: #d9480f;
    border-color: #d9480f;
    transform: translateY(-1px);
    box-shadow: var(--phyfa-box-shadow-hover);
}

.phyfa-button:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.phyfa-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--phyfa-background-light);
    color: var(--phyfa-text-gray);
    border-color: var(--phyfa-background-light);
}

.phyfa-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* حالت Loading - اصلاح شده */
.phyfa-button.loading {
    color: transparent !important;
    text-shadow: none !important;
    pointer-events: none;
}

/* مخفی کردن همه محتوای داخل دکمه در حالت loading */
.phyfa-button.loading > * {
    visibility: hidden !important;
}

/* نمایش فقط loading text */
.phyfa-button.loading .button-loading {
    display: inline-block !important;
    visibility: visible !important;
}

/* اطمینان از مخفی بودن button-text در حالت loading */
.phyfa-button.loading .button-text {
    visibility: hidden !important;
}

/* دکمه‌های ثانویه */
.phyfa-button-secondary {
    background-color: var(--phyfa-background-light);
    color: var(--phyfa-text-light) !important;
    border-color: var(--phyfa-background-light);
}

.phyfa-button-secondary:hover:not(:disabled) {
    background-color: #555;
    border-color: #555;
    color: var(--phyfa-text-light);
    opacity: 1;
}

/* دکمه‌های آیکون */
.phyfa-button-icon {
    background: none;
    border: none;
    color: var(--phyfa-text-gray);
    padding: 5px 8px;
    border-radius: var(--phyfa-border-radius-small);
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
    transition: color var(--phyfa-transition-fast), background-color var(--phyfa-transition-fast);
    cursor: pointer;
    position: relative;
}

.phyfa-button-icon:hover:not(:disabled) {
    color: var(--phyfa-primary-color);
    background-color: rgba(230, 87, 23, 0.1);
}

.phyfa-button-icon i {
    margin-left: 6px;
    font-size: 1.1em;
    line-height: 1;
}

.phyfa-button-icon:disabled {
    background: none;
    color: var(--phyfa-text-gray);
    opacity: 0.5;
    cursor: not-allowed;
}

.phyfa-button-icon:disabled:hover {
    background: none;
    color: var(--phyfa-text-gray);
}

/* جلوگیری از underline در hover */
.phyfa-button:hover,
.phyfa-button-secondary:hover {
    text-decoration: none !important;
}

/* استایل خاص برای دکمه‌های claim */
.phyfa-claim-button {
    position: relative;
    overflow: hidden;
}

.phyfa-claim-button.loading {
    opacity: 0.8;
}

.phyfa-claim-button.loading:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* اطمینان از صحیح بودن positioning */
.phyfa-claim-button .button-loading {
    white-space: nowrap;
}

/* حالت claimed */
.phyfa-claim-button.claimed-button {
    background-color: var(--phyfa-success-color, #4caf50);
    border-color: var(--phyfa-success-color, #4caf50);
    opacity: 0.8;
}

.phyfa-claim-button.claimed-button:hover {
    background-color: var(--phyfa-success-color, #4caf50);
    transform: none;
    box-shadow: none;
}

/* --- Modal Styles --- */
.phyfa-modal { display: none; position: fixed; z-index: 9980; left: 0; top: 0; width: 100%; height: 100%;  overflow: auto; background-color: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px); justify-content: center; align-items: center; font-family: var(--phyfa-font-primary); direction: rtl; animation: phyfa-modal-fade-in 0.3s ease-out; }
/* Specific z-index for the Core Message Modal to ensure it's on top */
#phyfa-message-modal {
    z-index: 10000; /* <<-- بالاترین z-index برای این مدال خاص */
}
.phyfa-modal.show { display: flex; }
@keyframes phyfa-modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
.phyfa-modal-content { background-color: var(--phyfa-background-darker); margin: auto; padding: 30px 40px; border: 1px solid var(--phyfa-background-light); width: 90%; max-width: 450px; border-radius: var(--phyfa-border-radius-large);  @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    } position: relative; color: var(--phyfa-text-light); text-align: center; box-shadow: var(--phyfa-box-shadow); transition: border-color var(--phyfa-transition-medium); border-left: 5px solid transparent; animation: phyfa-modal-slide-in 0.3s ease-out; }
.phyfa-modal-content.success { border-left-color: var(--phyfa-success-color); }
.phyfa-modal-content.error { border-left-color: var(--phyfa-error-color); }
@keyframes phyfa-modal-slide-in { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.phyfa-modal-close { color: var(--phyfa-text-gray); position: absolute; top: 10px; left: 15px; font-size: 32px; font-weight: bold; line-height: 1; transition: color 0.3s ease, transform 0.2s ease; padding: 0 5px; background: none; border: none; cursor: pointer; }
.phyfa-modal-close:hover, .phyfa-modal-close:focus { color: var(--phyfa-primary-color); transform: scale(1.1); outline: none; }
#phyfa-message-text { margin-top: 15px; font-size: 1.15em; line-height: 1.7; min-height: 30px; }
#phyfa-message-text a { color: var(--phyfa-primary-color); text-decoration: underline; }
#phyfa-message-text a:hover { color: #ff7a3a; }
.phyfa-modal-footer { padding: 15px 20px; border-top: 1px solid var(--phyfa-background-light); text-align: left; margin-top: 20px; }
.phyfa-modal-footer .phyfa-button { margin-right: 10px; }


/* --- Neon Pulse Effect for Success Modals (Your Enhanced Version) --- */

.phyfa-modal-content.success {
    border: 3px solid transparent; /* Keeps space for the glow */
    background-clip: padding-box; /* Ensures background doesn't go under the border area */
    position: relative;
}

/* Outer, more blurred glow */
.phyfa-modal-content.success::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    z-index: -1;
    border-radius: var(--phyfa-border-radius-large);
     @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    background: linear-gradient(45deg, #5302DC, #DC2F02, #FFC800, #005E00);
    background-size: 400% 400%;
    /* The opacity is now controlled by the animation itself */
    animation: phyfa-neon-pulse 2s ease-in-out infinite;
    filter: blur(2px); /* Increased blur for the outer layer */
}

/* Inner, sharper glow */
.phyfa-modal-content.success::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    z-index: -1;
    border-radius: var(--phyfa-border-radius-large);
    @supports (corner-shape: squircle) {
    border-radius: 80px;
    corner-shape: squircle;
    }
    background: linear-gradient(45deg, #5302DC, #DC2F02, #FFC800, #005E00);
    background-size: 400% 400%;
    /* The opacity is now controlled by the animation itself */
    animation: phyfa-neon-pulse 2s ease-in-out infinite;
    filter: blur(1px); /* Less blur for the inner layer */
}

@keyframes phyfa-neon-pulse {
    0% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
        opacity: 0.8;
    }
    25% {
        background-position: 100% 50%;
        filter: brightness(1.3) saturate(1.2);
        opacity: 1;
    }
    50% {
        background-position: 50% 100%;
        filter: brightness(1.5) saturate(1.5);
        opacity: 1;
    }
    75% {
        background-position: 0% 100%;
        filter: brightness(1.2) saturate(1.1);
        opacity: 1;
    }
    100% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
        opacity: 0.8;
    }
}

/*-------------------------------------------------------------
# Login Streak Styles (ENHANCED & SCOPED VERSION)
# All selectors are now scoped within .phyfa-login-streak-container
# to prevent conflicts with other PhyFa plugins.
--------------------------------------------------------------*/
.phyfa-login-streak-container {
    max-width: 90%;
    min-width: 300px;
    margin: 30px auto;
    padding: 2rem;
    background: linear-gradient(135deg, #1b1a1b 0%, #252626 100%);
    border-radius: 20px;
    @supports (corner-shape: squircle) {
    border-radius: 100px;
    corner-shape: squircle;
  }
    border: 1px solid #403d39;
    font-family: var(--phyfa-font-primary);
    color: var(--phyfa-text-light);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* افکت درخشان پس‌زمینه */
.phyfa-login-streak-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 87, 23, 0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

.phyfa-login-streak-container h3 {
    text-align: center;
    width: 100%;
    background: linear-gradient(45deg, #e65717, #f89b29);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.8em;
    font-weight: 700;
    border-bottom: 2px solid rgba(230, 87, 23, 0.3);
    padding-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.phyfa-login-streak-container h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e65717, #f89b29);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(230, 87, 23, 0.5);
}

.phyfa-login-streak-container .phyfa-streak-progress {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    width: 100%;
    justify-content: space-between !important;
    position: relative;
    z-index: 1;
}

/* بهبود استایل پیام راهنما*/
.phyfa-login-streak-container .phyfa-streak-info {
    text-align: center;
    width: 100%;
    margin-top: 2.5rem; /* فاصله بیشتر از دکمه‌ها*/
    padding: 0 10px;
    font-weight: 400;
    color: #fffcf2; /* رنگ روشن*/
    line-height: 1.8;
    font-size: 1.1em;
    position: relative;
    z-index: 1;
    opacity: 0; /* برای انیمیشن ورود*/
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* انیمیشن ساده برای متن*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل‌های بهبود یافته برای day-box */
.phyfa-login-streak-container .phyfa-day-box {
    max-width: 140px;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 15px;
    @supports (corner-shape: squircle) {
    border-radius: 60px;
    corner-shape: squircle;
    }
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2a2929 0%, #1e1f1e 100%);
    color: #fffcf2;
    padding: 1rem 0.8rem;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid #403d39;
    text-align: center;
}

.phyfa-login-streak-container .phyfa-day-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.phyfa-login-streak-container .phyfa-day-box:hover::before {
    left: 100%;
}

/* حالت‌های مختلف day-box */
.phyfa-login-streak-container .phyfa-day-box.active {
    border-color: #e65717;
    color: #fffcf2;
    box-shadow: 0 0 20px rgba(230, 87, 23, 0.3);
}

.phyfa-login-streak-container .phyfa-day-box.active:not(.claimable):not(.claimed) {
    background: linear-gradient(135deg, #e65717 0%, #dc2f02 100%);
    transform: translateY(-2px);
}

.phyfa-login-streak-container .phyfa-day-box.claimable {
    background: linear-gradient(135deg, #e65717 0%, #f89b29 100%);
    color: #fffcf2;
    cursor: pointer;
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 87, 23, 0.4), 0 0 30px rgba(230, 87, 23, 0.3);
    border: none;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 10px 25px rgba(230, 87, 23, 0.4), 0 0 30px rgba(230, 87, 23, 0.3); }
    to { box-shadow: 0 15px 35px rgba(230, 87, 23, 0.6), 0 0 40px rgba(230, 87, 23, 0.5); }
}

.phyfa-login-streak-container .phyfa-day-box.claimed {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: #fffcf2;
    transform: scale(1.02);
    cursor: default;
    border: none;
    opacity: 0.9;
}


.phyfa-login-streak-container .phyfa-day-number {
    font-weight: 700;
    margin-bottom: 0;
    font-size: 1.2em;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.phyfa-login-streak-container .phyfa-points {
    font-size: 1em;
    font-weight: 600;
    color: #fffcf2;
    margin-top: auto;
    margin-bottom: auto;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    flex-grow: 1;
}

.phyfa-login-streak-container .phyfa-points .phyfa-point-icon-png {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* استایل‌های بهبود یافته برای دکمه‌ها */
.phyfa-login-streak-container .phyfa-claim-button {
    padding: 1em 3em;
    font-size: 0.9em;
    font-weight: 600;
    max-width: 90%;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 40px;
    box-sizing: border-box;
    border: 2px solid transparent;
    border-radius: 10px;
    @supports (corner-shape: squircle) {
    border-radius: 30px;
    corner-shape: squircle;
  }
    overflow: visible;
    margin-top: auto;
    background: linear-gradient(135deg, #444 0%, #333 100%);
    color: #fffcf2;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.phyfa-login-streak-container .phyfa-claim-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.phyfa-login-streak-container .phyfa-claim-button:hover::before {
    left: 100%;
}

.phyfa-login-streak-container .phyfa-claim-button .button-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
}

.phyfa-login-streak-container .phyfa-claim-button .phyfa-point-icon-png {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-top: -2px;
    display: inline-block;
    margin-right: 4px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.phyfa-login-streak-container .phyfa-claim-button .phyfa-points-amount {
    margin-right: 2px;
}

/* دکمه claimed */
.phyfa-login-streak-container .phyfa-claim-button.claimed-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    cursor: default;
    border-color: transparent !important;
    opacity: 1 !important;
    font-size: 0.85em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    line-height: 1.2;
}

.phyfa-login-streak-container .phyfa-claim-button.claimed-button .button-text {
    gap: 0;
}

.phyfa-login-streak-container .phyfa-claim-button.claimed-button .phyfa-point-icon-png {
    display: none;
}

/* دکمه claimable */
.phyfa-login-streak-container .phyfa-day-box.claimable .phyfa-claim-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    color: #fffcf2;
    border-color: transparent;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.phyfa-login-streak-container .phyfa-day-box.claimable .phyfa-claim-button:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.25) 100%);
    transform: scale(1.05);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.phyfa-login-streak-container .phyfa-day-box.claimable .phyfa-claim-button .phyfa-point-icon-png {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.7)) !important;
}

/* دکمه‌های غیرفعال */
.phyfa-login-streak-container .phyfa-claim-button.future-day-button {
    background: linear-gradient(135deg, rgba(68, 68, 68, 0.3) 0%, rgba(51, 51, 51, 0.3) 100%) !important;
    border: 1px solid rgba(68, 68, 68, 0.5) !important;
    color: rgba(255, 252, 242, 0.6) !important;
    cursor: default !important;
    opacity: 0.7;
}

.phyfa-login-streak-container .phyfa-claim-button.future-day-button:hover {
    transform: none !important;
    box-shadow: none !important;
}

.phyfa-login-streak-container .phyfa-claim-button.future-active-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: default;
    opacity: 0.8;
}

.phyfa-login-streak-container .phyfa-claim-button.inactive-day-button {
    background: linear-gradient(135deg, rgba(80, 80, 80, 0.3) 0%, rgba(60, 60, 60, 0.3) 100%) !important;
    color: rgba(255, 252, 242, 0.5) !important;
    border-color: rgba(80, 80, 80, 0.5) !important;
    cursor: default;
    opacity: 0.6;
}

/* استایل آیکون در متن */
.phyfa-login-streak-container .phyfa-streak-info .phyfa-point-icon-png {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.15em;
    display: inline-block;
    margin: 0 4px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* 
   این دو بخش پایین قبلا هم عمومی بودند و نیازی به ایزوله سازی ندارند،
   چون برای همه مدال‌ها و کامپوننت‌ها به کار می‌روند.
   پس آن‌ها را بدون تغییر رها می‌کنیم.
*/
#phyfa-message-text .phyfa-point-icon-png.phyfa-modal-icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.2em;
    margin: 0 3px;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* افکت‌های انیمیشن اضافی */
.phyfa-login-streak-container .phyfa-day-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.phyfa-login-streak-container .phyfa-day-box.active:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(230, 87, 23, 0.4);
}


/* --- Responsive Adjustments (Also Scoped) --- */
@media (max-width: 768px) {
    /* No changes needed for the container itself */
    
    .phyfa-login-streak-container h3 {
        font-size: 1.5em;
    }
    
    .phyfa-login-streak-container .phyfa-streak-progress {
        grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
        gap: 0.5rem;
    }
    
    .phyfa-login-streak-container .phyfa-day-box {
        max-width: 120px;
        padding: 0.8rem 0.6rem;
    }
}

@media (max-width: 480px) {
    
    .phyfa-login-streak-container{
        max-width: 100%;
        padding: 0.8rem;
        
    }
    
    
    /* No changes needed for the container itself */
    
    .phyfa-login-streak-container h3 {
        font-size: 1.3em;
        margin-bottom: 1.5rem;
    }
    
    .phyfa-login-streak-container .phyfa-streak-progress {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    
    .phyfa-login-streak-container .phyfa-day-box {
        max-width: 100px;
        padding: 0.6rem 0.4rem;
    }
    
    .phyfa-login-streak-container .phyfa-day-number {
        font-size: 1em;
    }
    
    .phyfa-login-streak-container .phyfa-claim-button {
        font-size: 0.8em;
        min-height: 35px;
        max-width: 90%;
        padding: 1em 2em;
        display: inline-block;
        align-items: center;
    }
    
    .phyfa-login-streak-container .phyfa-streak-info {
        font-size: 0.95em;
    }
}

/* --- Fix Button Alignment Consistency across Themes --- */

/* 1. تنظیم مدل باکس و حذف استایل‌های مزاحم قالب */
.phyfa-login-streak-container .phyfa-claim-button {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important; /* تراز عمودی دقیق */
    justify-content: center !important; /* تراز افقی دقیق */
    line-height: normal !important; /* حذف ارتفاع خط قالب */
    vertical-align: middle !important;
    min-height: 42px; /* ارتفاع ثابت برای جلوگیری از تغییر سایز */
    padding: 0 10px !important; /* پدینگ ثابت */
}

/* 2. تنظیم دقیق متن داخل دکمه */
.phyfa-login-streak-container .phyfa-claim-button .button-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin: 0 !important;
    gap: 5px; /* فاصله بین متن و آیکون/تیک */
    font-family: var(--phyfa-font-primary) !important; /* اطمینان از فونت یکسان */
}

/* 3. استایل خاص برای دکمه‌های دریافت شده (سبز رنگ) */
.phyfa-login-streak-container .phyfa-claim-button.claimed-button {
    font-size: 0.9em !important; /* سایز فونت کمی ریزتر برای جا شدن */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* --- Final Polish: Shimmer & Shadows --- */

/* 1. اصلاح بیرون زدگی افکت شیمر (Shimmer) */
/* قبلاً overflow: visible بود که باعث می‌شد افکت از کادر بیرون بزند */
.phyfa-login-streak-container .phyfa-claim-button {
    overflow: hidden !important; /* محدود کردن افکت به داخل دکمه */
    border-radius: 10px; /* اطمینان از گرد بودن گوشه‌ها هنگام کلیپ شدن */
    /* پشتیبانی برای گوشه‌های Squircle اگر در مرورگر فعال باشد */
    @supports (corner-shape: squircle) {
        border-radius: 30px;
        corner-shape: squircle;
    }
}

/* 2. اصلاح رنگ سایه باکس‌های دریافت شده (سبز) */
/* باکس‌های Claimed همزمان کلاس Active هم دارند که سایه نارنجی می‌داد. */
/* با این کد، سایه سبز را اجبار می‌کنیم. */
.phyfa-login-streak-container .phyfa-day-box.claimed {
    /* سایه سبز ملایم متناسب با رنگ گرادیان سبز */
    box-shadow: 0 0 25px rgba(15, 255, 80, 0.4) !important;
}

/* اصلاح سایه هنگام هاور روی باکس‌های دریافت شده */
.phyfa-login-streak-container .phyfa-day-box.claimed:hover {
    box-shadow: 0 0 25px rgba(15, 255, 80, 0.6) !important;
    transform: translateY(-2px); /* حرکت نرم به بالا */
}