/* =========================
   СТИЛИ ДЛЯ НОВОЙ СИСТЕМЫ
   План месяца + Трехчастные задания + Рефлексия
   ========================= */

/* ========== ОБЩИЕ СТИЛИ МОДАЛЬНЫХ ОКОН ========== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
}

.month-plan-modal,
.reflection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.month-plan-content,
.reflection-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10001;
    animation: slideUp 0.4s ease;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    /* border-radius: 20px 20px 0 0; */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 5px 7px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    flex-direction: row;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

/* ========== СТИЛИ ПЛАНА МЕСЯЦА ========== */

.plan-section {
    margin: 8px;
    padding: 15px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.plan-section p {
    line-height: 1.7;
    margin-bottom: 12px;
    text-align: justify;
    hyphens: auto;
    word-wrap: break-word;
}

.plan-section p:last-child {
    margin-bottom: 0;
}

.plan-section.mystical p {
    font-size: 15px;
    color: #2d3748;
    letter-spacing: 0.2px;
}

.arcan-info {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
}

.plan-section h3 {
    line-height: 1.4;
    margin-bottom: 10px;
}

.plan-section ul,
.plan-section ol {
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 12px;
}

.plan-section li {
    margin-bottom: 8px;
}

.plan-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.plan-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 24px;
}

.plan-section p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.plan-section.mystical {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.plan-section.goal {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.plan-section.blocks {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.plan-section.desires {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}

.plan-section.opportunities {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.arcan-info {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px !important;
}

.focus-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.focus-list li {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 4px solid #667eea;
}

/* ========== СТИЛИ ТРЕХЧАСТНОГО ЗАДАНИЯ ========== */

.task-section {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.task-section:hover {
    transform: translateX(5px);
}

.task-section.support {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-left: 5px solid #f39c12;
}

.task-section.practice {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
    border-left: 5px solid #5f27cd;
}

.task-section.action {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    color: white;
    border-left: 5px solid #00a383;
}

.task-section.interpretation {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border-left: 5px solid #0770cd;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.task-section h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.task-section p {
    margin: 0;
    line-height: 1.6;
    font-size: 15px;
}

/* ========== СТИЛИ РЕФЛЕКСИИ ========== */

.reflection-field {
    margin-bottom: 20px;
}

.reflection-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.reflection-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all 0.3s ease;
}

.reflection-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rating-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.rating-field {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
}

.rating-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-input input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #dfe6e9;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.rating-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-input input[type="range"]::-webkit-slider-thumb:hover {
    background: #5563d1;
    transform: scale(1.2);
}

.rating-value {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    min-width: 30px;
    text-align: center;
}

/* ========== КНОПКИ ========== */

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-notes {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
    border: none;
    padding: 5px 7px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-notes:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(232, 67, 147, 0.4);
}

.btn-cancel {
    background: #dfe6e9;
    color: #2d3436;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #b2bec3;
}

.btn-save-reflection {
    background: linear-gradient(135deg, #00d2d3 0%, #0abfbc 100%);
}

.btn-notes-mini {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
    border: 2px solid white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-notes-mini:hover {
    transform: scale(1.2);
}

/* ========== ЛОАДЕР ========== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-message {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
}

/* ========== УВЕДОМЛЕНИЯ ========== */

.notification {
    animation: slideIn 0.3s ease;
}

/* ========== АНИМАЦИИ ========== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== АДАПТИВНОСТЬ ========== */

@media (max-width: 768px) {
    .month-plan-content,
    .reflection-content {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .modal-header h2,
    .modal-header h3 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .plan-section,
    .task-section {
        padding: 15px;
    }
    
    .rating-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2,
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .plan-section h3,
    .task-section h4 {
        font-size: 16px;
    }
}

/* ========== СКРОЛЛБАРЫ ========== */

.month-plan-content::-webkit-scrollbar,
.reflection-content::-webkit-scrollbar {
    width: 8px;
}

.month-plan-content::-webkit-scrollbar-track,
.reflection-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.month-plan-content::-webkit-scrollbar-thumb,
.reflection-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.month-plan-content::-webkit-scrollbar-thumb:hover,
.reflection-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5563d1 0%, #643a8c 100%);
}
