/* ОСНОВНЫЕ СТИЛИ ТРЕКЕРА ПРИВЫЧЕК */
.habit-stats-container {
    all: initial; /* Сбрасываем все наследуемые стили */
    display: block;
    background: #ffffff !important;
    border-radius: 10px !important;
    padding: 25px !important;
    margin: 30px auto !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e0e0e0 !important;
    max-width: 700px !important;
    font-family: 'DejaVuSans', sans-serif !important;
    box-sizing: border-box !important;
}

.habit-stats-container h2 {
    all: initial;
    display: block;
    color: #2c3e50 !important;
    text-align: center !important;
    margin: 0 0 25px 0 !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
}

/* Общие стили */
/* Подключение шрифтов */

@font-face {
    font-family: 'Artika_font-Regular';
    src: url('../../fonts/Artika_font-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'AstakhovFlacon_0';
    src: url('../../fonts/AstakhovFlacon_0.otf') format('opentype');
}

@font-face {
    font-family: 'DejaVuSans';
    src: url('../../fonts/DejaVuSans.ttf') format('truetype');
}

@font-face {
    font-family: 'DesyatiyRegular';
    src: url('../../fonts/DesyatiyRegular.ttf') format('truetype');
}

@font-face {
    font-family: 'DmitrievaSP';
    src: url('../../fonts/DmitrievaSP.otf') format('opentype');
}

@font-face {
    font-family: 'DreiFraktur';
    src: url('../../fonts/DreiFraktur.ttf') format('truetype');
}

@font-face {
    font-family: 'GeneralFailureRegular';
    src: url('../../fonts/GeneralFailureRegular.ttf') format('truetype');
}

@font-face {
    font-family: 'Kuhlenbach';
    src: url('../../fonts/Kuhlenbach.ttf') format('truetype');
}

@font-face {
    font-family: 'LiberationSans-Regular';
    src: url('../../fonts/LiberationSans-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'MolliWrites-Script';
    src: url('../../fonts/MolliWrites-Script.otf') format('opentype');
}

@font-face {
    font-family: 'NotoSans-Regular';
    src: url('../../fonts/NotoSans-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'PassionsConflictRUS-Regular';
    src: url('../../fonts/PassionsConflictRUS-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'PastryChefCyrillic-Script';
    src: url('../../fonts/PastryChefCyrillic-Script.otf') format('opentype');
}

@font-face {
    font-family: 'UraBumBumSP';
    src: url('../../fonts/UraBumBumSP.otf') format('opentype');
}

@font-face {
    font-family: 'Verdana';
    src: url('../../fonts/Verdana.ttf') format('truetype');
}

.modal {
    z-index: 1050 !important; /* Увеличим з-индекс модала, чтобы он находился над всеми остальными элементами */
}

.modal-backdrop.show {
    z-index: 1040 !important; /* фон модала ниже самого модала */
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1, h2, h3 {
    color: #007bff;
}

/* Форма загрузки файлов */
#uploadForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#uploadForm label {
    font-weight: bold;
}

#uploadForm input[type="file"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
}

#uploadForm input[type="text"], #uploadForm input[type="color"], #uploadForm input[type="number"], #uploadForm select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
}

#uploadForm button {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#uploadForm button:hover {
    background-color: #0056b3;
}

/* Прогресс-бар */
#progressBar {
    width: 100%;
    margin: 20px 0;
}

.progress-bar {
    background-color: #007bff;
    color: #fff;
    font-size: 14px;
    line-height: 20px;
}

/* Предпросмотр файлов */
#previewSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.preview-image {
    width: 300px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.file-name {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

.download-button {
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.download-button:hover {
    background-color: #0056b3;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    margin: 10% auto;
    width: 80%;
    max-width: 600px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.modal-header h5 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 18px;
    color: #007bff;
    cursor: pointer;
}

.modal-body {
    padding: 20px 0;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Скрываемый контент */
.spoiler-content {
    display: none;
    padding: 10px;
    border: 1px solid #ccc;
    border-top: none;
    background-color: #f0f0f0;
}

.spoiler-header {
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
	text-align: center;
}

.spoiler-header:hover {
    color: #0056b3;
}

/* Кукис-баннер */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    padding: 10px;
    text-align: center;
    display: none;
    z-index: 9999;
}

.cookie-banner button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.cookie-banner button:hover {
    background-color: #0056b3;
}

/* Поддержка отзывчивого дизайна */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .modal-content {
        width: 90%;
    }
    .sample-container-wrapper {
        flex-direction: column;
        align-items: center;
    }
}


.opacity-slider {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.opacity-slider .slider-progress {
    position: relative;
    top: 0;
    left: 0;
    height: 20px; /* Увеличим высоту для лучшего отображения */
    background-color: #fff; /* Default background color */
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.opacity-slider .slider-progress .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%; /* Заполняет всю высоту .slider-progress */
    background-color: #000; /* Default progress fill color */
    opacity: 1; /* Initial opacity */
    transition: opacity 0.3s ease;
}

.sample-container {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
}

.sample-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.sample-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    pointer-events: none;
    user-select: none;
	line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    max-width: 90%; /* Ограничивает ширину текста */
	font-family: 'Artika_font-Regular', sans-serif; /* Установка шрифта по умолчанию */
}

.sample-container-wrapper {
    display: flex;
    flex-wrap: wrap;
    /*gap: 20px;*/
    justify-content: center;
}

/* Habit Tracker Styles */
.habit-stats-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.streak-display {
    text-align: center;
    margin: 20px 0;
}

.streak-number {
    font-size: 72px;
    font-weight: bold;
    color: #4CAF50;
    line-height: 1;
}

.streak-label {
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

.progress-container {
    background: #f0f0f0;
    border-radius: 20px;
    height: 10px;
    margin: 25px 0;
    overflow: hidden;
}

.progress-bar {
    background: #4CAF50;
    height: 100%;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.stat-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}
/* ==================== */
/* HABIT TRACKER STYLES */
/* ==================== */

div.habit-stats-container {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    border: 1px solid #e0e0e0;
}

div.habit-stats-container > h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

div.streak-display {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

div.streak-number {
    font-size: 4.5rem;
    font-weight: 700;
    color: #27ae60;
    line-height: 1;
    margin: 0;
    font-family: 'DejaVuSans', sans-serif;
}

div.streak-label {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    font-weight: 500;
}

div.progress-container {
    background: #ecf0f1;
    border-radius: 20px;
    height: 12px;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

div.progress-container > div.progress-bar {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    border-radius: 20px;
}

div.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #95a5a6;
    margin-top: 0.8rem;
    font-style: italic;
}

div.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

div.stats-grid > div.stat-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

div.stats-grid > div.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

div.stat-item > div.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    font-family: 'DejaVuSans', sans-serif;
}

div.stat-item > div.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

div.habit-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

button.habit-button {
    flex: 1 1 200px;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

button.habit-button.danger {
    background: linear-gradient(to right, #ff6b6b, #ee5253);
    color: white;
    box-shadow: 0 2px 10px rgba(238, 82, 83, 0.3);
}

button.habit-button.danger:hover {
    background: linear-gradient(to right, #ee5253, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(238, 82, 83, 0.4);
}

button.habit-button:not(.danger) {
    background: linear-gradient(to right, #48dbfb, #0abde3);
    color: white;
    box-shadow: 0 2px 10px rgba(10, 189, 227, 0.3);
}

button.habit-button:not(.danger):hover {
    background: linear-gradient(to right, #0abde3, #48dbfb);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 189, 227, 0.4);
}

/* Адаптивность */
@media (max-width: 768px) {
    div.streak-number {
        font-size: 3.5rem;
    }
    
    div.stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    button.habit-button {
        flex: 1 1 100%;
    }
}

/* ДОПОЛНИТЕЛЬНЫЕ СТИЛИ */
.habit-stats-container .streak-display {
    text-align: center;
    margin: 25px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.habit-stats-container .streak-number {
    font-size: 72px;
    font-weight: 700;
    color: #27ae60;
    line-height: 1;
    margin: 0;
}

.habit-stats-container .streak-label {
    font-size: 18px;
    color: #7f8c8d;
    margin-top: 10px;
}