/**
 * استایل ابزار محاسبه معدل
 */

/* راهنما */
.novin-grade-guide {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f4ff 0%, #f0e7ff 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.novin-guide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #5c35c9;
    font-weight: 500;
}

.novin-guide-item svg {
    flex-shrink: 0;
    color: #7043f2;
}

/* کانتینر دروس */
.novin-courses-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.novin-courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.novin-courses-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.novin-courses-title svg {
    color: #7043f2;
}

.novin-btn-add-course {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    color: #7043f2;
    border: 2px solid #7043f2;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'danaFaNum', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.novin-btn-add-course:hover {
    background: #7043f2;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 67, 242, 0.3);
}

.novin-btn-add-course svg {
    transition: transform 0.3s ease;
}

.novin-btn-add-course:hover svg {
    transform: rotate(90deg);
}

/* لیست دروس */
.novin-courses-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.novin-course-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.novin-course-item:hover {
    border-color: #7043f2;
    box-shadow: 0 4px 12px rgba(112, 67, 242, 0.1);
}

.novin-course-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7043f2 0%, #5c35c9 100%);
    color: #ffffff;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.novin-course-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    flex: 1;
}

.novin-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.novin-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.novin-btn-remove-course {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff5f5;
    color: #dc3545;
    border: 2px solid #fee2e2;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.novin-btn-remove-course:hover {
    background: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
    transform: scale(1.05);
}

/* اکشن‌ها */
.novin-grade-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* نتایج */
.novin-grade-result {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 3px solid #f5f5f5;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.novin-result-header {
    margin-bottom: 30px;
}

.novin-result-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.novin-result-title svg {
    color: #7043f2;
}

/* کارت‌های اصلی */
.novin-result-main-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.novin-main-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.novin-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7043f2 0%, #5c35c9 100%);
}

.novin-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(112, 67, 242, 0.2);
}

.novin-main-card-average {
    background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%);
}

.novin-main-card-gpa {
    background: linear-gradient(135deg, #ffffff 0%, #fff9e6 100%);
}

.novin-main-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #7043f2 0%, #5c35c9 100%);
    border-radius: 16px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(112, 67, 242, 0.3);
}

.novin-main-card-content {
    flex: 1;
}

.novin-main-card-label {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 8px;
}

.novin-main-card-value {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 8px;
}

.novin-main-card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.novin-main-card-status.status-success {
    background: #d1fae5;
    color: #065f46;
}

.novin-main-card-status.status-info {
    background: #dbeafe;
    color: #1e40af;
}

.novin-main-card-status.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.novin-main-card-status.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.novin-main-card-subtitle {
    font-size: 12px;
    color: #868e96;
    margin-top: 4px;
}

/* آمار */
.novin-result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.novin-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.novin-stat-card:hover {
    border-color: #7043f2;
    box-shadow: 0 4px 12px rgba(112, 67, 242, 0.1);
    transform: translateY(-2px);
}

.novin-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.novin-stat-icon-success {
    background: #d1fae5;
    color: #065f46;
}

.novin-stat-icon-error {
    background: #fee2e2;
    color: #991b1b;
}

.novin-stat-icon-warning {
    background: #fef3c7;
    color: #92400e;
}

.novin-stat-icon-info {
    background: #dbeafe;
    color: #1e40af;
}

.novin-stat-content {
    flex: 1;
}

.novin-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 4px;
}

.novin-stat-label {
    font-size: 13px;
    color: #6c757d;
}

/* جدول نتایج */
.novin-result-table-container {
    margin-bottom: 30px;
}

.novin-result-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.novin-result-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.novin-result-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.novin-result-table thead {
    background: linear-gradient(135deg, #7043f2 0%, #5c35c9 100%);
    color: #ffffff;
}

.novin-result-table th {
    padding: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.novin-result-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.novin-result-table tbody tr:hover {
    background: #f8f9fa;
}

.novin-result-table tbody tr:last-child {
    border-bottom: none;
}

.novin-result-table td {
    padding: 16px;
    text-align: center;
    font-size: 14px;
    color: #495057;
}

.novin-course-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.novin-course-status.passed {
    background: #d1fae5;
    color: #065f46;
}

.novin-course-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* نمودار پیشرفت */
.novin-progress-container {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.novin-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.novin-progress-label {
    font-size: 15px;
    font-weight: 600;
    color: #495057;
}

.novin-progress-value {
    font-size: 18px;
    font-weight: 700;
    color: #7043f2;
}

.novin-progress-bar {
    width: 100%;
    height: 16px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.novin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7043f2 0%, #5c35c9 100%);
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.novin-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .novin-grade-guide {
        flex-direction: column;
        gap: 12px;
    }

    .novin-courses-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .novin-btn-add-course {
        width: 100%;
        justify-content: center;
    }

    .novin-course-item {
        flex-direction: column;
        align-items: stretch;
    }

    .novin-course-inputs {
        grid-template-columns: 1fr;
    }

    .novin-btn-remove-course {
        width: 100%;
        height: 44px;
    }

    .novin-grade-actions {
        flex-direction: column;
    }

    .novin-grade-actions .novin-btn {
        width: 100%;
    }

    .novin-result-main-cards {
        grid-template-columns: 1fr;
    }

    .novin-main-card-value {
        font-size: 36px;
    }

    .novin-result-stats {
        grid-template-columns: 1fr;
    }

    .novin-result-table {
        font-size: 12px;
    }

    .novin-result-table th,
    .novin-result-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .novin-main-card {
        flex-direction: column;
        text-align: center;
    }

    .novin-main-card-value {
        font-size: 32px;
    }
}
