/* ===========================================
   صفحه درصدگیری آزمون - Test Percent Calculator
   ========================================== */

/* متغیرها */
:root {
    --pc-primary: #4D96FF;
    --pc-primary-dark: #2563EB;
    --pc-accent: #6C5CE7;
    --pc-success: #10b981;
    --pc-warning: #f59e0b;
    --pc-danger: #ef4444;
    --pc-text: #1e293b;
    --pc-text-light: #64748b;
    --pc-bg: #f8fafc;
    --pc-white: #ffffff;
    --pc-border: #f1f5f9;
    --pc-shadow: 0 10px 30px rgba(0,0,0,0.03);
    --pc-shadow-hover: 0 20px 40px rgba(77,150,255,0.15);
}

/* صفحه اصلی */
.percent-page {
    background: var(--pc-bg);
    min-height: 100vh;
    padding: 40px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== هدر صفحه ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(77,150,255,0.1);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(77,150,255,0.2);
    margin-bottom: 15px;
}

.page-badge i {
    color: var(--pc-primary);
}

.page-badge span {
    color: var(--pc-primary);
    font-weight: 800;
    font-size: 0.9rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: var(--pc-text);
}

.page-header h1 span {
    color: var(--pc-primary);
    position: relative;
}

.page-header h1 span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--pc-primary), transparent);
    border-radius: 2px;
}

.page-header p {
    color: var(--pc-text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== گرید اصلی ===== */
.percent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

/* ===== کارت فرم ===== */
.calculator-card {
    background: var(--pc-white);
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--pc-shadow);
    border: 1px solid var(--pc-border);
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(77,150,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--pc-border);
}

.card-header i {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pc-primary);
    font-size: 1.2rem;
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 900;
    margin: 0;
    color: var(--pc-text);
}

.card-header span {
    color: var(--pc-primary);
}

/* فرم */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--pc-text);
    margin-bottom: 8px;
}

.form-label i {
    color: var(--pc-primary);
    width: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--pc-border);
    border-radius: 14px;
    font-family: lalezar;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--pc-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(77,150,255,0.1);
}

.form-control[type="number"] {
    direction: ltr;
    text-align: left;
}

.optional-badge {
    font-size: 0.7rem;
    background: #e2e8f0;
    color: var(--pc-text-light);
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: 8px;
}

/* دکمه محاسبه */
.calculate-btn {
    width: 100%;
    padding: 16px;
    background: var(--pc-primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:hover {
    background: var(--pc-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(77,150,255,0.4);
}

.calculate-btn i {
    transition: transform 0.3s;
}

.calculate-btn:hover i {
    transform: rotate(90deg);
}

/* ===== کارت نتیجه ===== */
.result-card {
    background: var(--pc-white);
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--pc-shadow);
    border: 1px solid var(--pc-border);
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.result-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--pc-text-light);
    opacity: 0.7;
}

.result-placeholder i {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--pc-primary);
    opacity: 0.3;
}

.result-placeholder h3 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: var(--pc-text);
}

.result-content {
    display: none;
}

.result-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* بخش درصد اصلی */
.percent-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
    position: relative;
}

.percent-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.percent-circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.percent-circle-fill {
    fill: none;
    stroke: var(--pc-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 502; /* محیط دایره */
    stroke-dashoffset: 502;
    transition: stroke-dashoffset 1s ease;
}

.percent-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.percent-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--pc-text);
    line-height: 1;
}

.percent-number small {
    font-size: 1rem;
    color: var(--pc-text-light);
}

.percent-label {
    font-size: 0.8rem;
    color: var(--pc-text-light);
}

/* کارت‌های آماری */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.stat-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 15px 10px;
    text-align: center;
    border: 1px solid var(--pc-border);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--pc-text);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--pc-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.stat-label i {
    color: var(--pc-primary);
    font-size: 0.7rem;
}

/* تحلیل‌ها */
.analysis-section {
    margin: 30px 0;
}

.analysis-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--pc-text);
    margin: 20px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-title i {
    color: var(--pc-primary);
}

.analysis-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.analysis-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--pc-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.analysis-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pc-primary);
    font-size: 1.2rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.03);
}

.analysis-content {
    flex: 1;
}

.analysis-content strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: var(--pc-text);
}

.analysis-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--pc-text-light);
}

/* ===== مقالات مرتبط ===== */
.related-section {
    margin-top: 60px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 30px;
    text-align: center;
    color: var(--pc-text);
}

.section-title span {
    color: var(--pc-primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--pc-border);
    transition: all 0.4s;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pc-shadow-hover);
    border-color: var(--pc-primary);
}

.article-image {
    height: 160px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-body {
    padding: 20px;
}

.article-title {
    font-size: 1rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: var(--pc-text);
}

.article-meta {
    font-size: 0.75rem;
    color: var(--pc-text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== توضیحات ===== */
.info-section {
    margin-top: 60px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.info-card {
    background: white;
    border-radius: 24px;
    padding: 25px;
    border: 1px solid var(--pc-border);
    transition: all 0.3s;
}

.info-card:hover {
    border-color: var(--pc-primary);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: #eff6ff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pc-primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: var(--pc-text);
}

.info-card p {
    color: var(--pc-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 900px) {
    .percent-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid,
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* اسکرول بار کل صفحه */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #4D96FF;
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* برای فایرفاکس */
* {
    scrollbar-width: thin;
    scrollbar-color: #4D96FF #f1f5f9;
}
/* اسکرول با رنگ‌های مختلف برای بخش‌های مختلف */
.dark-scroll::-webkit-scrollbar-thumb {
    background: #1e293b;
}

.gradient-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4D96FF, #6C5CE7);
}

/* اسکرول با گوشه‌های نرم‌تر */
.rounded-scroll::-webkit-scrollbar {
    width: 12px;
}

.rounded-scroll::-webkit-scrollbar-thumb {
    background: #4D96FF;
    border-radius: 20px;
    border: 3px solid #f1f5f9;
}