/* ==================== */
/* WATERMARKPRO СТИЛИ   */
/* MODERN DESIGN        */
/* ==================== */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f9fafb;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
}

/* Подключение шрифтов */
@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: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: var(--dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* === HERO SECTION === */
.hero-section {
    background: var(--gradient);
    color: white;
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ВАЖНО: отменяем белый фон у container внутри hero */
.hero-section .container {
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    position: static !important;
    max-width: 1200px;
}

.hero-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white !important;
    margin-bottom: 15px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.95) !important;
    margin-bottom: 30px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.badge-feature {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
    color: white !important;
}

.badge-feature:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
}

/* === Кнопка "Все сервисы" === */
.btn-back {
    color: white !important;
    border-color: rgba(255,255,255,0.3) !important;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
    color: white !important;
}

/* === Основной container (рабочая область) === */
.container {
    max-width: 1200px;
    margin: -40px auto 40px;
    padding: 40px;
    background-color: #fff;
    box-shadow: var(--shadow-md);
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

h1, h2, h3 {
    color: var(--primary);
    font-weight: 600;
}

/* Форма загрузки файлов */
#uploadForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 20px 0;
}

#uploadForm label {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

#uploadForm input[type="file"] {
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    background: #f9fafb;
    transition: all 0.3s;
}

#uploadForm input[type="file"]:hover {
    border-color: var(--primary);
    background: rgba(102,126,234,0.05);
}

#uploadForm input[type="text"],
#uploadForm input[type="color"],
#uploadForm input[type="number"],
#uploadForm select {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    transition: all 0.3s;
}

#uploadForm input[type="text"]:focus,
#uploadForm input[type="color"]:focus,
#uploadForm input[type="number"]:focus,
#uploadForm select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
    outline: none;
}

#uploadForm button {
    padding: 14px 35px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(102,126,234,0.4);
    transition: all 0.3s;
}

#uploadForm button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102,126,234,0.5);
}

/* Прогресс-бар */
#progressBar {
    width: 100%;
    margin: 25px 0;
    background: #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient);
    color: #fff;
    font-size: 14px;
    line-height: 25px;
    font-weight: 600;
}

/* Предпросмотр файлов */
#previewSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 30px 0;
}

#previewSection h2 {
    color: var(--primary);
    font-size: 2rem;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.preview-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.preview-image {
    width: 350px;
    height: auto;
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.file-name {
    margin-top: 10px;
    font-size: 15px;
    color: var(--dark);
    font-weight: 600;
}

.download-button {
    margin-top: 10px;
    padding: 10px 25px;
    background: var(--gradient-success);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16,185,129,0.4);
}

/* Модальное окно */
.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: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 600;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-header button:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px 0;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Скрываемый контент (спойлер) */
.spoiler-content {
    display: none;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-top: none;
    background-color: #f9fafb;
    border-radius: 0 0 12px 12px;
}

.spoiler-header {
    cursor: pointer;
    color: var(--primary);
    text-decoration: none;
    text-align: center;
    padding: 15px 30px;
    background: var(--gradient);
    color: white;
    border-radius: 12px;
    transition: all 0.3s;
    font-weight: 600;
    display: inline-block;
}

.spoiler-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

/* Кукис-баннер */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: calc(100% - 40px);
    background: white;
    color: var(--dark);
    padding: 20px;
    text-align: center;
    display: none;
    z-index: 9999;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.cookie-banner button {
    background: var(--gradient);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 10px;
    transition: all 0.3s;
}

.cookie-banner button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

/* Слайдер прозрачности */
.opacity-slider {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.opacity-slider .slider-progress {
    position: relative;
    top: 0;
    left: 0;
    height: 20px;
    background-color: #fff;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.opacity-slider .slider-progress .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #000;
    opacity: 1;
    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;
    justify-content: center;
}

/* === Футер (как в image-optimizer) === */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 30px 0;
    margin-top: 60px;
}

.site-footer .container {
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    position: static !important;
}

.site-footer p {
    margin: 0;
    color: rgba(255,255,255,0.8);
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .modal-content {
        width: 90%;
    }

    .sample-container-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-icon {
        font-size: 3.5rem;
    }
}