* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== LOADING PAGE ===== */
.loading-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-page.active {
    opacity: 1;
    visibility: visible;
}

.loading-container {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f0f0f0;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.loading-timer {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 10px;
}

/* ===== LANDING PAGE ===== */
.landing-page {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.landing-page.hidden {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icons {
    font-size: 48px;
    margin-bottom: 20px;
}

.logo-section h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.subtitle {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== INPUT GROUP ===== */
.input-group {
    margin-bottom: 40px;
}

.input-group form {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.input-group input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #999;
}

.btn-download {
    padding: 16px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.btn-download:active {
    transform: translateY(-1px);
}

/* ===== FEATURES ===== */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature {
    text-align: center;
    padding: 25px 15px;
    background: #f8f9ff;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature:hover {
    background: #f0f4ff;
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

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

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.feature-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* ===== WARNING ===== */
.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 18px;
    border-radius: 10px;
    font-size: 14px;
    color: #856404;
    line-height: 1.6;
}

/* ===== DOWNLOAD PAGE ===== */
.download-page {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 750px;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    position: absolute;
}

.download-page.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.container {
    width: 100%;
}

.header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.back-link:hover {
    color: #764ba2;
    transform: translateX(-5px);
}

.video-info {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 14px;
    margin-bottom: 30px;
}

.video-thumbnail {
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 160px;
    height: 110px;
    border-radius: 10px;
    object-fit: cover;
}

.video-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-details h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 700;
}

.video-details p {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab {
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab:hover {
    color: #667eea;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== DOWNLOAD LIST ===== */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    gap: 20px;
}

.download-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.item-info {
    flex: 1;
}

.item-format {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.item-details {
    font-size: 13px;
    color: #999;
    line-height: 1.4;
}

.download-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.3);
}

/* ===== INFO BOX ===== */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 18px;
    border-radius: 10px;
    font-size: 14px;
    color: #1565c0;
    line-height: 1.6;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 900px) {

    .landing-page,
    .download-page {
        padding: 40px 30px;
        max-width: 100%;
    }

    .logo-section h1 {
        font-size: 32px;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-thumbnail img {
        width: 140px;
        height: 95px;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .landing-page,
    .download-page {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .logo-icons {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .logo-section h1 {
        font-size: 26px;
        margin-bottom: 12px;
    }

    .subtitle {
        font-size: 14px;
    }

    /* Stack input and button vertically on mobile */
    .input-group form {
        flex-direction: column;
        gap: 10px;
    }

    .input-group input,
    .btn-download {
        width: 100%;
    }

    .input-group input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 10px;
    }

    .btn-download {
        padding: 14px 20px;
        font-size: 14px;
        border-radius: 10px;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .feature {
        padding: 18px 12px;
    }

    .feature-icon {
        font-size: 28px;
    }

    .feature-title {
        font-size: 13px;
    }

    .feature-desc {
        font-size: 12px;
    }

    .warning {
        padding: 14px;
        font-size: 13px;
    }

    /* Adjust download page layout for mobile */
    .video-info {
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .video-thumbnail img {
        width: 100%;
        height: auto;
        max-height: 150px;
    }

    .tabs {
        gap: 0;
    }

    .tab {
        padding: 14px 16px;
        font-size: 13px;
        flex: 1;
        text-align: center;
    }

    /* Stack download item content on mobile */
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }

    .download-btn {
        width: 100%;
        padding: 12px;
    }

    .info-box {
        padding: 14px;
        font-size: 13px;
    }

    /* Adjust loading container for mobile */
    .loading-container {
        padding: 35px 20px;
        max-width: 90%;
    }

    .loading-text {
        font-size: 20px;
    }

    .loading-subtext {
        font-size: 13px;
    }

    .loading-timer {
        font-size: 16px;
    }
}

/* ===== RESPONSIVE - SMALL MOBILE ===== */
@media (max-width: 380px) {
    .logo-section h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 13px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .tab {
        font-size: 12px;
        padding: 12px 12px;
    }

    .download-btn {
        font-size: 13px;
    }
}