* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary: #ff0050;
    --primary-dark: #e00045;
    --secondary: #25f4ee;
    --dark: #121212;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #e0e0e0;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    color: var(--primary);
}

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

input[type="text"] {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary);
    outline: none;
}

button {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 80, 0.3);
}

button:active {
    transform: translateY(0);
}

.help-text {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 5px;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.hidden {
    display: none;
}

.error-message {
    background: #ffe6e6;
    color: #d63031;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #d63031;
}

.success-message {
    background: #e6f7ee;
    color: #00b894;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #00b894;
}

.video-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-player {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: var(--dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
}

.video-player video {
    width: 100%;
    display: block;
    border-radius: 12px;
    background-color: #000;
}

.video-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #333;
    color: white;
    border-radius: 12px;
    text-align: center;
    padding: 20px;
}

.video-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.video-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.video-actions button {
    padding: 10px 15px;
    font-size: 14px;
}

.download-btn {
    background: linear-gradient(to right, #00b894, #00a085);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    background-color: #f0f0f0;
}

.author-details {
    flex: 1;
}

.author-details p {
    margin-bottom: 8px;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
}

.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 12px;
    z-index: 10;
}

.video-loading.hidden {
    display: none;
}

.paste-btn {
    background: linear-gradient(to right, #0984e3, #74b9ff);
}

.clear-btn {
    background: linear-gradient(to right, #d63031, #e17055);
}

.api-info {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--gray);
}

.profile-section {
    text-align: center;
    margin: 30px 0;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .video-player {
        max-width: 100%;
    }
    
    .author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .video-actions {
        flex-direction: column;
    }
}