/* ========================================
   ОБЩИЕ СТИЛИ ДЛЯ ОБОИХ ЭКРАНОВ
   ======================================== */

/* Базовые настройки */
* {
    box-sizing: border-box;
}

.tm-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.tm-container {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   ЭКРАН 1: ГЛАВНЫЙ ЭКРАН С ВИДЕО
   ======================================== */

.tm-screen-1 {
    background: linear-gradient(135deg, #3866b5 0%, #2a4d8f 100%);
    color: #ffffff;
    text-align: center;
}

/* Видео/картинка блок */
.tm-video-wrapper {
    margin: 0 auto 24px auto;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.tm-video-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.tm-video-preview {
    width: 100%;
    height: auto;
    max-height: 35vh;
    object-fit: contain;
    display: block;
}

.tm-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(220, 64, 59, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ffffff;
    padding-left: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                0 0 0 0 rgba(220, 64, 59, 0.7);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
    overflow: hidden;
}

.tm-play-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 100%;
    height: 200%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);
    transform: skewX(-20deg);
    animation: shimmer 3s ease-in-out infinite;
}

.tm-video-container:hover .tm-play-button {
    background: rgba(220, 64, 59, 1);
    transform: translate(-50%, -50%) scale(1.15);
    animation: pulse-hover 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                    0 0 0 0 rgba(220, 64, 59, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                    0 0 0 15px rgba(220, 64, 59, 0);
    }
}

@keyframes pulse-hover {
    0%, 100% {
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4),
                    0 0 0 0 rgba(220, 64, 59, 0.8);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4),
                    0 0 0 20px rgba(220, 64, 59, 0);
    }
}

@keyframes shimmer {
    0% {
        left: -150%;
    }
    50%, 100% {
        left: 150%;
    }
}

.tm-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0;
    color: #ffffff;
}

.tm-subtitle {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 24px 0;
    opacity: 0.95;
}

.tm-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.tm-benefit-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 16px;
    margin-bottom: 12px;
    text-align: left;
    padding-left: 20px;
}

.tm-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    font-weight: 700;
}

/* ========================================
   ЭКРАН 2: ИНФОРМАЦИЯ О КАНАЛЕ
   ======================================== */

.tm-screen-2 {
    background: #f8f9fa;
    color: #212529;
    padding: 60px 20px;
}

.tm-title-2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 40px 0;
    color: #3866b5;
    text-align: center;
}

.tm-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.tm-feature-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tm-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.tm-feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.tm-feature-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #212529;
}

.tm-feature-text {
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    color: #6c757d;
}

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

.tm-btn {
    display: inline-block;
    padding: 18px 40px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.tm-btn-primary {
    background: #DC403B;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(220, 64, 59, 0.4);
}

.tm-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    transform: skewX(-20deg);
}

.tm-btn-primary:hover::before {
    left: 100%;
}

.tm-btn-primary:hover {
    background: #c53530;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 64, 59, 0.5);
}

.tm-btn-primary:active {
    transform: translateY(0);
}

.tm-btn-secondary {
    background: #3866b5;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(56, 102, 181, 0.3);
    display: block;
    margin: 0 auto;
    max-width: 350px;
    text-align: center;
}

.tm-btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(135, 176, 235, 0.6), transparent);
    transition: left 0.6s ease;
    transform: skewX(-20deg);
}

.tm-btn-secondary:hover::before {
    left: 100%;
}

.tm-btn-secondary:hover {
    background: #2a4d8f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 102, 181, 0.4);
}

.tm-btn-secondary:active {
    transform: translateY(0);
}

/* ========================================
   АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ
   ======================================== */

@media (max-width: 768px) {
    .tm-video-wrapper {
        margin-bottom: 20px;
    }

    .tm-play-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .tm-title {
        font-size: 28px;
    }

    .tm-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .tm-benefits {
        margin-bottom: 24px;
    }

    .tm-benefit-item {
        font-size: 15px;
        padding-left: 10px;
    }

    .tm-btn {
        width: 100%;
        max-width: 100%;
        padding: 16px 30px;
        font-size: 15px;
    }

    .tm-screen-2 {
        padding: 50px 20px;
    }

    .tm-title-2 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .tm-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tm-feature-card {
        padding: 24px 20px;
    }

    .tm-feature-icon {
        font-size: 40px;
    }

    .tm-feature-title {
        font-size: 17px;
    }

    .tm-feature-text {
        font-size: 14px;
    }

    .tm-btn-secondary {
        width: 100%;
        max-width: 100%;
    }
}

/* ========================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ (до 480px)
   ======================================== */

@media (max-width: 480px) {
    .tm-screen {
        padding: 16px;
        padding-top: env(safe-area-inset-top, 16px);
        padding-bottom: env(safe-area-inset-bottom, 16px);
    }

    .tm-screen-1 {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
    }

    .tm-video-wrapper {
        margin-bottom: 16px;
        max-width: 100%;
    }

    .tm-video-container {
        border-radius: 12px;
    }

    .tm-video-preview {
        max-height: 28vh;
    }

    .tm-play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        padding-left: 4px;
    }

    .tm-title {
        font-size: 22px;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .tm-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
        line-height: 1.4;
    }

    .tm-benefits {
        margin-bottom: 20px;
    }

    .tm-benefit-item {
        font-size: 13px;
        margin-bottom: 8px;
        padding-left: 0;
    }

    .tm-check {
        width: 20px;
        height: 20px;
        font-size: 12px;
        margin-right: 8px;
    }

    .tm-btn {
        width: 100%;
        max-width: 100%;
        padding: 16px 20px;
        font-size: 14px;
        text-align: center;
        border-radius: 10px;
    }

    .tm-screen-2 {
        padding: 40px 15px;
    }

    .tm-title-2 {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .tm-features {
        gap: 16px;
        margin-bottom: 30px;
    }

    .tm-feature-card {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .tm-feature-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .tm-feature-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .tm-feature-text {
        font-size: 13px;
    }
}

/* ========================================
   АДАПТАЦИЯ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ (до 360px)
   ======================================== */

@media (max-width: 360px) {
    .tm-screen {
        padding: 12px;
    }

    .tm-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .tm-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .tm-video-preview {
        max-height: 25vh;
    }

    .tm-benefit-item {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .tm-check {
        width: 18px;
        height: 18px;
        font-size: 11px;
        margin-right: 6px;
    }

    .tm-btn {
        padding: 14px 16px;
        font-size: 13px;
    }
}

/* ========================================
   АДАПТАЦИЯ ДЛЯ КОРОТКИХ ЭКРАНОВ (ландшафт мобильного)
   ======================================== */

@media (max-height: 650px) and (max-width: 900px) {
    .tm-screen-1 {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .tm-video-preview {
        max-height: 25vh;
    }

    .tm-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .tm-subtitle {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .tm-benefits {
        margin-bottom: 16px;
    }

    .tm-benefit-item {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .tm-btn {
        padding: 12px 20px;
    }
}
