.m3u8-upload-area {
    border: 3px dashed #3498db;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.m3u8-upload-area:hover {
    border-color: #2980b9;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.m3u8-upload-area.m3u8-active {
    border-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.m3u8-upload-icon {
    font-size: 64px;
    color: #3498db;
    margin-bottom: 15px;
}

.m3u8-upload-text {
    font-size: 18px;
    color: #555;
    margin-bottom: 8px;
}

.m3u8-upload-hint {
    font-size: 14px;
    color: #888;
}

.m3u8-info-panel {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
    display: none;
}

.m3u8-info-panel.m3u8-show {
    display: block;
    animation: m3u8FadeIn 0.4s ease;
}

.m3u8-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.m3u8-info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.m3u8-info-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m3u8-info-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.m3u8-format-section {
    margin: 25px 0;
}

.m3u8-format-section h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.m3u8-format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.m3u8-format-option {
    position: relative;
}

.m3u8-format-option input[type="radio"] {
    display: none;
}

.m3u8-format-label {
    display: block;
    padding: 14px 18px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.m3u8-format-option input[type="radio"]:checked + .m3u8-format-label {
    border-color: #3498db;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.m3u8-format-label:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.m3u8-advanced-section {
    margin: 25px 0;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.m3u8-advanced-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 16px;
}

.m3u8-advanced-header h3 {
    color: #2c3e50;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.m3u8-advanced-toggle {
    font-size: 24px;
    color: #3498db;
    transition: transform 0.3s;
}

.m3u8-advanced-toggle.m3u8-collapsed {
    transform: rotate(-90deg);
}

.m3u8-advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.m3u8-advanced-content.m3u8-expanded {
    max-height: 500px;
}

.m3u8-advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.m3u8-advanced-field {
    display: flex;
    flex-direction: column;
}

.m3u8-advanced-field label {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.m3u8-advanced-field select,
.m3u8-advanced-field input {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

.m3u8-advanced-field select:focus,
.m3u8-advanced-field input:focus {
    border-color: #3498db;
    outline: none;
}

.m3u8-quality-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m3u8-quality-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.m3u8-quality-option:hover {
    background: #e8f4fc;
}

.m3u8-quality-option input[type="radio"] {
    flex-shrink: 0;
}

.m3u8-quality-label {
    flex: 1;
    cursor: pointer;
    overflow: hidden;
}

.m3u8-quality-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 2px;
}

.m3u8-quality-desc {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m3u8-quality-custom {
    margin-top: 8px;
}

.m3u8-progress-panel {
    margin: 25px 0;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    display: none;
}

.m3u8-progress-panel.m3u8-show {
    display: block;
    animation: m3u8FadeIn 0.4s ease;
}

.m3u8-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.m3u8-progress-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.m3u8-progress-spinner {
    animation: m3u8Spin 1s linear infinite;
}

.m3u8-progress-bar-wrapper {
    background: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    height: 28px;
    margin-bottom: 16px;
    position: relative;
}

.m3u8-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
    border-radius: 20px;
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
    min-width: 50px;
}

.m3u8-progress-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.m3u8-progress-stat {
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
}

.m3u8-progress-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.m3u8-progress-stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.m3u8-log-area {
    margin-top: 16px;
    background: #1e1e1e;
    padding: 16px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #4caf50;
    line-height: 1.6;
}

.m3u8-log-line {
    margin: 2px 0;
}

.m3u8-log-error {
    color: #ff5252;
}

.m3u8-log-warning {
    color: #ffeb3b;
}

.m3u8-log-info {
    color: #4fc3f7;
}

.m3u8-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
}

.m3u8-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m3u8-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.m3u8-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.m3u8-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.m3u8-btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.m3u8-btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.m3u8-btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.m3u8-btn-info {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.m3u8-download-panel {
    margin: 25px 0;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    display: none;
}

.m3u8-download-panel.m3u8-show {
    display: block;
    animation: m3u8FadeIn 0.4s ease;
}

.m3u8-download-icon {
    font-size: 72px;
    color: #4caf50;
    margin-bottom: 16px;
}

.m3u8-download-title {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
}

.m3u8-download-info {
    color: #666;
    margin-bottom: 20px;
}

.m3u8-download-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.m3u8-download-stat {
    text-align: center;
}

.m3u8-download-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.m3u8-download-stat-label {
    font-size: 12px;
    color: #888;
}

.m3u8-file-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.m3u8-file-icon {
    font-size: 48px;
    color: #e74c3c;
}

.m3u8-file-info {
    flex: 1;
}

.m3u8-file-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    word-break: break-all;
}

.m3u8-file-size {
    font-size: 13px;
    color: #888;
}

.m3u8-file-remove {
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.m3u8-file-remove:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

@keyframes m3u8FadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes m3u8Spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes m3u8Pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.m3u8-pulse {
    animation: m3u8Pulse 2s infinite;
}

@media (max-width: 768px) {
    .m3u8-upload-area {
        padding: 30px 20px;
    }

    .m3u8-upload-icon {
        font-size: 48px;
    }

    .m3u8-format-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .m3u8-action-buttons {
        flex-direction: column;
    }

    .m3u8-btn {
        width: 100%;
        justify-content: center;
    }

    .m3u8-download-stats {
        flex-direction: column;
        gap: 16px;
    }
}
