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

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

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

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.video-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.video-input:focus {
    outline: none;
    border-color: #667eea;
}

.load-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.load-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.load-button:active {
    transform: translateY(0);
}

.video-container {
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    min-height: 0;
}

.video-container iframe {
    display: block;
    width: 100%;
}

.metadata-container {
    margin-top: 30px;
}

.variations-container {
    margin-top: 20px;
}

.metadata-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.metadata-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.metadata-content {
    display: flex;
    gap: 20px;
    align-items: start;
}

.video-thumbnail {
    width: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.metadata-details {
    flex: 1;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.video-duration {
    color: #666;
    font-size: 0.95rem;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6bffbf 0%, #5aee6b 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: default;
    box-shadow: 0 4px 12px rgba(0, 255, 162, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

.duration-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.variations-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.variations-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.variations-list {
    list-style-position: inside;
    padding-left: 0;
}

.variations-list li {
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 1rem;
    line-height: 1.5;
    transition: transform 0.2s;
}

.variations-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.loading-indicator {
    text-align: center;
    padding: 40px 20px;
}

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

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

.loading-indicator p {
    color: #666;
    font-size: 0.95rem;
}

.error-message {
    display: none;
    padding: 20px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    margin-top: 20px;
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.error-text {
    color: #c33;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

.cancel-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.cancel-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

.cancel-button:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .input-group {
        flex-direction: column;
    }

    .load-button {
        width: 100%;
    }

    .metadata-content {
        flex-direction: column;
    }

    .video-thumbnail {
        width: 100%;
    }
}
