* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f4effa, #e8dff5, #f9f6fc);
    color: #332244;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    padding: 30px 20px 20px 20px;
}

header h1 {
    color: #6a259c;
    text-shadow: 0 4px 10px rgba(106, 37, 156, 0.1);
    margin: 0;
    font-size: 2rem;
    letter-spacing: 1px;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 12px;
    box-sizing: border-box;
}

.section-block {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(139, 101, 197, 0.25);
    border-radius: 24px;
    padding: 25px 20px;
    margin-bottom: 35px;
    box-shadow: 0 15px 35px rgba(139, 101, 197, 0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    color: #5c3b91;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(139, 101, 197, 0.15);
    padding-bottom: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Стрелочка-связка */
.card-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
}

.connector-text {
    font-size: 0.9rem;
    color: #8b65c5;
    font-weight: 500;
}

.connector-arrow {
    font-size: 1.3rem;
    color: #bd93f9;
}

.single-card-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

.photo-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid rgba(139, 101, 197, 0.2);
    box-shadow: 0 8px 20px rgba(139, 101, 197, 0.05);
}

/* Десктопная версия - фиксированная высота */
.photo-card {
    height: 380px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.caption-panel {
    height: 0;
    opacity: 0;
    background: linear-gradient(135deg, #8b65c5, #bd93f9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    padding: 0 15px;
    box-sizing: border-box;
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.section-block-me .photo-card {
    max-width: 100%;
    height: 380px;
}

.photo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 101, 197, 0.25);
    border-color: #8b65c5;
}

.photo-card:hover .image-wrapper {
    height: 80%;
}

.photo-card:hover img {
    transform: scale(1.05);
}

.photo-card:hover .caption-panel {
    height: 20%;
    opacity: 1;
}

.delivery-sub-title {
    text-align: center;
    color: #6a259c;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.delivery-container {
    background: #ffffff;
    border-radius: 24px;
    padding: 25px 20px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(139, 101, 197, 0.08);
    border: 1px solid rgba(139, 101, 197, 0.15);
    color: #333333;
}

.delivery-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #5c3b91;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.delivery-header span {
    font-weight: bold;
}

.header-box-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-left: 5px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #e2d9f3;
    z-index: 1;
}

.timeline-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    z-index: 2;
}

.step-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.step-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.step-desc {
    font-size: 0.85rem;
    margin: 4px 0 0 0;
}

.step-completed .step-icon {
    background: #e2d9f3;
    color: #8b65c5;
    font-weight: bold;
}

.step-completed .step-title {
    color: #5c3b91;
}

.step-completed .step-desc {
    color: #9a82be;
}

.step-active .step-icon {
    background: #8b65c5;
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 0 0 15px rgba(139, 101, 197, 0.3);
}

.step-active .step-title {
    color: #5c3b91;
    font-weight: bold;
}

.step-active .step-desc {
    color: #8b65c5;
}

.step-disabled .step-icon {
    background: #ffffff;
    border: 2px solid #e2d9f3;
    color: #b0a2c7;
    font-size: 1rem;
}

.step-disabled .step-title {
    color: #b0a2c7;
}

.step-disabled .step-desc {
    color: #c4b9d7;
}

    .connector-arrow {
        transform: rotate(90deg);
    }

/* ========== АДАПТИВ ДЛЯ ТЕЛЕФОНОВ ========== */

/* Планшеты и маленькие экраны */
@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr auto 1fr;
        gap: 15px;
        align-items: center;
    }
    
    .card-connector {
        flex-direction: column;
        padding: 0;
    }
    
    .connector-arrow {
        transform: rotate(0deg);
    }
    
    .section-block {
        padding: 35px;
    }
    
    .photo-card {
        height: 400px;
    }
    
    .section-block-me .photo-card {
        max-width: 420px;
        margin: 0 auto;
    }
    
    .delivery-container {
        padding: 35px 40px;
        max-width: 520px;
    }
}

/* Большие экраны (десктоп) */
@media (min-width: 768px) {
    header h1 {
        font-size: 2.8rem;
    }
    
    .container {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .photo-card:hover {
        transform: translateY(-15px);
    }
}

/* Мобильные устройства (до 600px) - ВСЕ ФОТО ОДИНАКОВОГО РАЗМЕРА */
@media (max-width: 600px) {
    /* Убираем фиксированную высоту */
    .photo-card {
        height: auto !important;
        border-radius: 16px;
    }
    
    /* Делаем фото квадратными и одинаковыми */
    .image-wrapper {
        width: 100%;
        height: auto !important;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }
    
    .photo-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    /* Подпись всегда видна, прилегает вплотную */
    .caption-panel {
        height: auto !important;
        opacity: 1 !important;
        padding: 12px 15px !important;
        line-height: 1.2;
    }
    
    /* Стрелка между карточками */
    .card-connector {
        padding: 4px 0;
    }
    
    .connector-text {
        font-size: 0.85rem;
    }
    
    .connector-arrow {
        font-size: 1.2rem;
    }
    
    /* Центральная карточка с энергетиком тоже квадратная */
    .section-block-me .photo-card {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Очень маленькие телефоны (до 380px) */
@media (max-width: 380px) {
    header {
        padding: 20px 15px 15px 15px;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    .section-block {
        padding: 18px 15px;
        margin-bottom: 25px;
        border-radius: 20px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }
    
    .caption-panel {
        font-size: 0.9rem;
        padding: 10px 12px !important;
    }
    
    .delivery-container {
        padding: 18px 15px;
    }
    
    .delivery-header {
        font-size: 0.95rem;
        gap: 8px;
    }
    
    .timeline {
        gap: 18px;
    }
    
    .timeline::before {
        left: 16px;
    }
    
    .step-icon {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .step-title {
        font-size: 0.9rem;
    }
    
    .step-desc {
        font-size: 0.75rem;
    }
    
    .connector-text {
        font-size: 0.75rem;
    }
    
    .connector-arrow {
        font-size: 1rem;
    }
}

/* ========== БЛОК ПАРТНЕРА ========== */

.promo-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 20px;
    margin-bottom: 35px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(139, 101, 197, 0.2);
    backdrop-filter: blur(8px);
}

.promo-label {
    font-size: 0.78rem;
    color: #9a82be;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.promo-label::after {
    content: '—';
    margin-left: 8px;
    opacity: 0.5;
}

.promo-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #5c3b91;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(139, 101, 197, 0.12), rgba(189, 147, 249, 0.1));
    border: 1px solid rgba(139, 101, 197, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-link:hover {
    background: linear-gradient(135deg, rgba(139, 101, 197, 0.22), rgba(189, 147, 249, 0.18));
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 101, 197, 0.2);
}

.promo-link strong {
    color: #8b65c5;
}

.tg-icon {
    width: 18px;
    height: 18px;
    color: #229ED9;
    flex-shrink: 0;
}

/* ========== КАСТОМНЫЙ ВИДЕО ПЛЕЕР ========== */

.custom-player {
    position: relative;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(139, 101, 197, 0.3);
    cursor: pointer;
    user-select: none;
}

.custom-player video {
    width: 100%;
    display: block;
    max-height: 520px;
    object-fit: contain;
    background: #ffffff;
}

/* Центральная кнопка-оверлей */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
    pointer-events: auto;
}

.play-overlay-btn {
    width: 70px;
    height: 70px;
    background: rgba(139, 101, 197, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 30px rgba(139, 101, 197, 0.5);
    transition: transform 0.2s ease, background 0.2s ease;
    padding-left: 5px;
}

.play-overlay:hover .play-overlay-btn {
    transform: scale(1.1);
    background: rgba(139, 101, 197, 1);
}

/* Панель управления */
.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(20, 5, 40, 0.95), transparent);
    padding: 30px 14px 12px 14px;
    transition: opacity 0.3s ease;
}

/* Прогресс-бар */
.progress-wrap {
    padding: 6px 0;
    cursor: pointer;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: height 0.15s ease;
}

.progress-wrap:hover .progress-bar {
    height: 6px;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8b65c5, #bd93f9);
    border-radius: 4px;
    pointer-events: none;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    background: #bd93f9;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(189, 147, 249, 0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.progress-wrap:hover .progress-thumb {
    opacity: 1;
}

/* Нижняя строка кнопок */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    gap: 8px;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: #e0d0f8;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
}

.ctrl-btn:hover {
    color: #ffffff;
    background: rgba(139, 101, 197, 0.3);
}

.time-display {
    color: rgba(220, 200, 255, 0.85);
    font-size: 0.8rem;
    font-family: 'Segoe UI', monospace;
    white-space: nowrap;
}

/* Ползунок громкости */
.volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #bd93f9;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(189,147,249,0.6);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #bd93f9;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 6px rgba(189,147,249,0.6);
}

/* Фуллскрин */
.custom-player:fullscreen video {
    max-height: 100vh;
}

@media (max-width: 600px) {
    .volume-slider { width: 50px; }
    .play-overlay-btn { width: 55px; height: 55px; font-size: 1.2rem; }
}

/* Альбомная ориентация на телефонах */
@media (max-width: 800px) and (orientation: landscape) {
    .section-block {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    /* В альбомной ориентации делаем фото не квадратными, а широкими */
    .image-wrapper {
        aspect-ratio: 16 / 9;
    }
    
    .gallery-grid {
        gap: 12px;
    }
    
    .delivery-container {
        padding: 15px;
    }
    
    .timeline {
        gap: 12px;
    }
    
    .caption-panel {
        padding: 8px 12px !important;
        font-size: 0.9rem;
    }
}