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

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: #333;
    min-height: 100vh;
    padding: 20px;
    font-size: 14px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* Video Thumbnail */
.video-thumbnail {
    margin-bottom: 20px;
}

.video-thumbnail img {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Video Title */
.video-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Tips Section */
.tips {
    margin-bottom: 25px;
    line-height: 1.6;
}

.tips p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.tips .warning {
    color: #dc3545;
    font-weight: 500;
}

.contact-link {
    color: #007bff;
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

/* Format Toggle */
.format-toggle {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 12px 50px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e5e5e5;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn.active {
    background: linear-gradient(to right bottom, #AD46FF, #F6339A);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(173, 70, 255, 0.3);
}

/* Table Wrapper */
.table-wrapper {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Download Table */
.download-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.download-table thead {
    background: #f5f5f5;
}

.download-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    border-bottom: 2px solid #e5e5e5;
}

.download-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 14px;
    color: #555;
}

.download-table tbody tr:last-child td {
    border-bottom: none;
}

.download-table tbody tr:hover {
    background: #fafafa;
}

/* Download Button */
.btn-download {
    padding: 10px 24px;
    background: linear-gradient(to right bottom, #05DF72, #155DFC);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 223, 114, 0.4);
}

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

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top-color: #AD46FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: #666;
    font-size: 14px;
}

/* Error Message */
.error-message {
    background: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    color: #dc3545;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .format-toggle {
        flex-direction: column;
        gap: 8px;
    }

    .tab-btn {
        width: 100%;
    }

    .download-table {
        font-size: 12px;
    }

    .download-table th,
    .download-table td {
        padding: 10px 12px;
    }

    .video-title {
        font-size: 16px;
    }

    .btn-download {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* For iframe embedding */
body.iframe-mode {
    padding: 10px;
}

body.iframe-mode .container {
    max-width: 100%;
}