/* ریست و تنظیمات پایه */
.melli-frontend-wrap {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    direction: rtl;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #1e293b;
    line-height: 1.7;
}

.melli-frontend-wrap * {
    box-sizing: border-box;
}

/* هدر */
.melli-frontend-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 50%, #fce7f3 100%);
    border-radius: 25px;
    position: relative;
    overflow: hidden;
}

.melli-frontend-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: melli-rotate 20s linear infinite;
}

@keyframes melli-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.melli-frontend-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 1;
    color: #1e293b;
}

.melli-title-icon {
    font-size: 48px;
    animation: melli-bounce 2s infinite;
}

@keyframes melli-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.melli-frontend-subtitle {
    font-size: 18px;
    color: #64748b;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* بخش معرفی */
.melli-frontend-intro {
    margin-bottom: 50px;
}

.melli-frontend-intro h2 {
    text-align: center;
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.melli-frontend-intro h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #ff6b9d, #f5576c);
    border-radius: 2px;
}

.melli-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.melli-feature-item {
    background: white;
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 2px solid #ffe4ec;
    transition: all 0.3s;
}

.melli-feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(245, 87, 108, 0.15);
    border-color: #ff6b9d;
}

.melli-feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.melli-feature-item h3 {
    font-size: 18px;
    color: #f5576c;
    margin: 0 0 10px 0;
}

.melli-feature-item p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

/* آمار */
.melli-frontend-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.melli-stat-card {
    background: white;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #ffe4ec;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.melli-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #ff6b9d, #f5576c);
}

.melli-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(245, 87, 108, 0.15);
}

.melli-stat-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.melli-stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b9d, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.melli-stat-title {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* محتوای اصلی */
.melli-frontend-content {
    margin-bottom: 50px;
}

.melli-frontend-content h2 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 15px;
    text-align: center;
}

.melli-content-desc {
    text-align: center;
    color: #64748b;
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* تب‌ها */
.melli-frontend-tabs {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 2px solid #ffe4ec;
}

.melli-frontend-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 25px;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
    border-bottom: 2px solid #ffe4ec;
}

.melli-frontend-tab-btn {
    background: white;
    border: 2px solid #ffe4ec;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.melli-frontend-tab-btn:hover {
    border-color: #ff6b9d;
    color: #f5576c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.15);
}

.melli-frontend-tab-btn.active {
    background: linear-gradient(135deg, #ff6b9d, #f5576c);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.melli-tab-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

.melli-frontend-tab-btn:not(.active) .melli-tab-badge {
    background: #ffe4ec;
    color: #f5576c;
}

/* محتوای تب */
.melli-frontend-tabs-content {
    padding: 30px;
}

.melli-frontend-tab-pane {
    display: none;
    animation: melli-fadeIn 0.4s ease-out;
}

.melli-frontend-tab-pane.active {
    display: block;
}

@keyframes melli-fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.melli-pane-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ffe4ec;
}

.melli-pane-header h3 {
    font-size: 24px;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.melli-pane-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

/* جستجو */
.melli-frontend-search {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

.melli-frontend-search:focus-within {
    border-color: #ff6b9d;
    box-shadow: 0 0 0 4px rgba(245, 87, 108, 0.1);
}

.melli-frontend-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 8px;
    font-family: inherit;
    background: transparent;
}

.melli-frontend-search-count {
    font-size: 13px;
    color: #f5576c;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(135deg, #fff0f5, #ffe4ec);
    padding: 6px 14px;
    border-radius: 20px;
}

/* لیست پیامک‌ها */
.melli-frontend-messages {
    display: grid;
    gap: 15px;
}

.melli-frontend-message {
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s;
    width: 100%;
}

.melli-frontend-message:hover {
    border-color: #ff6b9d;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.1);
    transform: translateX(-5px);
}

.melli-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    padding: 10px;
}

.melli-message-number {
    background: linear-gradient(135deg, #ff6b9d, #f5576c);
    color: white;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
    position: absolute;
}
.melli-message-number{
    right:0;
}
.melli-frontend-copy-btn {
    background: linear-gradient(135deg, #ff6b9d, #f5576c);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(245, 87, 108, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    left: 0;
    position: absolute;
}

.melli-frontend-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.melli-frontend-copy-btn.copied {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
}

.melli-frontend-copy-btn svg {
    width: 16px;
    height: 16px;
}

.melli-message-body {
    margin: 0;
    font-size: 14px;
    color: #4a4a4a;
    line-height: 2;
    text-align: justify;
}

/* FAQ */
.melli-frontend-faq {
    margin-bottom: 50px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
    border-radius: 20px;
    border: 2px solid #ffe4ec;
}

.melli-frontend-faq h2 {
    text-align: center;
    font-size: 28px;
    color: #1e293b;
    margin: 0 0 30px 0;
}

.melli-faq-list {
    display: grid;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.melli-faq-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s;
    width: 100%;
}

.melli-faq-item[open] {
    border-color: #ff6b9d;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.1);
}

.melli-faq-item summary {
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.melli-faq-item summary::-webkit-details-marker {
    display: none;
}

.melli-faq-item summary::after {
    content: '+';
    font-size: 24px;
    color: #f5576c;
    font-weight: 300;
    transition: transform 0.3s;
}

.melli-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.melli-faq-item summary:hover {
    color: #f5576c;
}

.melli-faq-item p {
    padding: 0 22px 20px;
    margin: 0;
    color: #64748b;
    line-height: 1.9;
    font-size: 14px;
}

.melli-faq-item a {
    color: #f5576c;
    text-decoration: none;
    font-weight: 600;
}

.melli-faq-item a:hover {
    text-decoration: underline;
}

/* CTA */
.melli-frontend-cta {
    background: linear-gradient(135deg, #ff6b9d 0%, #f093fb 50%, #f5576c 100%);
    border-radius: 25px;
    padding: 50px 30px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.melli-frontend-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: melli-rotate 15s linear infinite;
}

.melli-cta-content {
    position: relative;
    z-index: 1;
}

.melli-frontend-cta h2 {
    font-size: 32px;
    margin: 0 0 15px 0;
    color: white;
}

.melli-frontend-cta p {
    font-size: 16px;
    margin: 0 0 30px 0;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.melli-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: #f5576c;
    padding: 16px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.melli-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.melli-cta-button svg {
    transition: transform 0.3s;
}

.melli-cta-button:hover svg {
    transform: translateX(-5px);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .melli-frontend-wrap {
        padding: 20px 15px;
    }
    
    .melli-frontend-title {
        font-size: 26px;
        flex-direction: column;
    }
    
    .melli-title-icon {
        font-size: 36px;
    }
    
    .melli-frontend-subtitle {
        font-size: 15px;
    }
    
    .melli-frontend-intro h2,
    .melli-frontend-content h2,
    .melli-frontend-faq h2 {
        font-size: 22px;
    }
    
    .melli-frontend-tabs-nav {
        padding: 15px;
        gap: 8px;
    }
    
    .melli-frontend-tab-btn {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .melli-frontend-tabs-content {
        padding: 20px 15px;
    }
    
    .melli-pane-header h3 {
        font-size: 20px;
    }
    
    .melli-frontend-message {
        padding: 15px;
    }
    
    .melli-message-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .melli-frontend-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .melli-frontend-cta h2 {
        font-size: 24px;
    }
    
    .melli-cta-button {
        padding: 14px 25px;
        font-size: 14px;
    }
}
