/* --- Med Sim General Styles --- */
.msm-app-container {
    max-width: 1200px;
    margin: 40px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    direction: rtl;
    /* חשוב לעברית */
}

.utilsmsn {
    position: absolute;
    left: 0;
    top: 0;
    width: 230px;
    display: flex;
    font-size: 12px;
}

/* --- Header & Timer --- */
.msm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.msm-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 20px;
}

.msm-timer.warning {
    color: #d9534f;
    background: #fde8e7;
}

.msm-progress {
    font-size: 1.1rem;
    color: #666;
}

/* --- Columns Layout --- */
.msm-columns-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.msm-column {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.msm-column:hover {
    border-color: #bbb;
    background: #fafafa;
}

/* Selected State - כמו באפיון: צבע ירוק/מודגש */
.msm-column.selected {
    border-color: #4CAF50;
    background: #f1f8e9;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}

.msm-col-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #444;
}

.msm-col-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.msm-col-items li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    line-height: 1.4;
    color: #555;
}

.msm-col-items li:last-child {
    border-bottom: none;
}

/* --- Footer & Actions --- */
.msm-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.msm-btn {
    background: #00915a;
    border-radius: 25px;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.msm-btn:hover {
    background: #00915a;
}

.msm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Pyramid Layout */
.msm-pyramid-container {
    display: flex;
    gap: 30px;
}

.msm-bank-wrapper {
    width: 30%;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.msm-trait-card {
    background: white;
    padding: 8px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: grab;
    font-size: 0.9rem;
}

.msm-pyramid-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.pyramid-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.msm-slot {
    width: 100px;
    height: 40px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-weight: bold;
    color: #999;
}

.msm-slot.empty {
    /* Style for empty slots showing numbers */
}

/* כשתכונה נכנסת לפירמידה */
.msm-trait-card.in-pyramid {
    background: #e3f2fd;
    border-color: #2196f3;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bio 300 Styles */
.msm-scale-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    border: 2px solid #0073aa;
    background: white;
    color: #0073aa;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.msm-scale-btn:hover {
    background: #eef;
}

.msm-scale-btn.selected {
    background: #0073aa;
    color: white;
    transform: scale(0.95);
}

/* כפתורים עגולים לסולם 1-7 */
.msm-scale-btn.circle {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* assets/css/sim-style.css */
.msm-nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    background: #0d1f3c;
}

.msm-nav-item {
    margin-left: 10px;
}

button.msm-nav-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    color: #00915a;
}

.msm-nav-item.is-active .msm-nav-btn {
    color: #00915a;
    border-bottom: 3px solid #00915a;
}

.msm-nav-item.is-completed .msm-nav-btn::after {
    content: ' ✓';
    color: #fff;
}

/* עיצוב עיגולי תוצאות */
.msm-circle-progress {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(closest-side, white 79%, transparent 80% 100%),
        conic-gradient(#0073aa calc(var(--percent) * 1%), #eeeeee 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.msm-score-num {
    font-size: 1.4rem;
    font-weight: bold;
    color: #0073aa;
}

.msm-traits-grid {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* עיצוב כללי למודולים */
.msm-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 25px;
    border-radius: 8px 8px 0 0;
}

/* כפתורי סקאלה - שאלון 300 */
.msm-scale-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.msm-scale-btn {
    flex: 1;
    padding: 15px 10px;
    border: 2px solid #0073aa;
    background: white;
    color: #0073aa;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.msm-scale-btn:hover {
    background: #f0f8ff;
}

/* עיגולי ציונים (Circle Progress) בסיכום */
.msm-traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 25px;
}

.msm-circle-progress {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(closest-side, white 79%, transparent 80% 100%),
        conic-gradient(#0073aa calc(var(--percent) * 1%), #e2e8f0 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.msm-score-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
}

/* מבנה הפירמידה הסימטרי (ב"ש) */
.msm-pyramid-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    align-items: start;
    /* יוצר את אפקט ה"פעמון" */
    gap: 8px;
    padding: 20px;
}

/* מאפשר לאנימציה לעבוד על משתנה ה-CSS של האחוזים */
@property --percent {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

/* עיצוב משופר לעיגול ההתקדמות */
.msm-circle-progress {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    /* שימוש במשתנה המונפש */
    background: radial-gradient(closest-side, white 79%, transparent 80% 100%),
        conic-gradient(#0073aa calc(var(--percent) * 1%), #e2e8f0 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);

    /* הגדרת האנימציה */
    animation: msm-load-circle 1.5s ease-out forwards;
}

.msm-score-num {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0073aa;
}

/* הגדרת תנועת הטעינה מאפס למטרה */
@keyframes msm-load-circle {
    from {
        --percent: 0;
    }
}

/* הוספת השהיה מדורגת לכל עיגול ליצירת אפקט "גל" */
.msm-trait-card:nth-child(1) .msm-circle-progress {
    animation-delay: 0.1s;
}

.msm-trait-card:nth-child(2) .msm-circle-progress {
    animation-delay: 0.2s;
}

.msm-trait-card:nth-child(3) .msm-circle-progress {
    animation-delay: 0.3s;
}

.msm-trait-card:nth-child(4) .msm-circle-progress {
    animation-delay: 0.4s;
}

.msm-trait-card:nth-child(n+5) .msm-circle-progress {
    animation-delay: 0.5s;
}

/* עיצוב כרטיסיית התכונה */
.msm-trait-card {
    transition: transform 0.3s ease;
}

.msm-trait-card:hover {
    transform: translateY(-5px);
}

/* התאמה למובייל */
@media (max-width: 600px) {
    .msm-scale-options.numeric {
        flex-wrap: wrap;
    }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .msm-columns-wrapper {
        flex-direction: column;
    }
}