:root {
    --module-bg: #f9f9f9;
    --module-border: #e9e9ed;
    --module-hover: #f0f2f5;
    --text-primary: #1c1e21;
    --text-secondary: #606770;
    --accent-color: #007AFF;
    --disabled-color: #c7c7cc;
    --success-color: #34c759;
}

.vocabulary-container {
    max-width: 700px;
    margin: 0 auto;
}

.vocabulary-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--module-border);
}

.vocabulary-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.vocabulary-header h1 i {
    color: var(--accent-color);
    margin-left: 10px;
}

.vocabulary-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.module-card {
    background-color: var(--module-bg);
    border: 1px solid var(--module-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.module-card:not(.disabled):hover {
    background-color: var(--module-hover);
    transform: translateY(-3px);
}

.module-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.module-info .icon {
    font-size: 28px;
    color: var(--accent-color);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eef5ff;
    border-radius: 50%;
}

.module-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 5px 0;
}

.module-text p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.module-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.soon-badge {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: #e9e9ed;
    padding: 4px 10px;
    border-radius: 8px;
}

.module-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 23px;
    width: 23px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Settings Panel */
.settings-panel {
    background-color: #f0f2f5;
    border-radius: 12px;
    padding: 20px;
    margin-top: -10px; /* Pull it closer to the card */
    margin-bottom: 10px;
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 15px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-panel h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-item label {
    font-size: 15px;
    color: var(--text-secondary);
}

.setting-item input[type="number"] {
    width: 70px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 500;
}

.repetition-info p {
    font-size: 14px;
    color: var(--text-secondary);
    background-color: #e9e9ed;
    padding: 10px;
    border-radius: 8px;
    margin: 0;
    text-align: center;
}

.save-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-end; /* Align to the right */
    font-family: 'Vazirmatn', sans-serif; /* Added Font */
}

.settings-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    padding: 5px;
}

.settings-toggle-btn:hover {
    color: var(--accent-color);
}

.settings-toggle-btn.active {
    transform: rotate(90deg);
    color: var(--accent-color);
}

.save-btn:hover {
    background-color: #0056b3;
}

.vocabulary-footer {
    text-align: center;
    margin-top: 30px;
}

.back-btn i {
    margin-left: 5px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
    .vocabulary-header h1 {
        font-size: 22px;
    }
    .vocabulary-header p {
        font-size: 15px;
    }
    .module-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .module-info {
        gap: 15px;
    }
    .module-text h3 {
        font-size: 17px;
    }
    .module-text p {
        font-size: 13px;
    }
    .module-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .setting-item input[type="number"] {
        width: 100%;
        box-sizing: border-box;
    }
    .save-btn {
        width: 100%;
        text-align: center;
    }
}
