.tiktok-downloader {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.tiktok-downloader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></g></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

.tiktok-downloader * {
    position: relative;
    z-index: 1;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.main-content h2 {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

#tiktok-url {
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#tiktok-url::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#tiktok-url:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.paste-btn, .clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.clear-btn {
    background: #ef4444;
}

.paste-btn:hover {
    background: #2563eb;
}

.clear-btn:hover {
    background: #dc2626;
}

.download-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    color: #fecaca;
}

.video-result {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    animation: fadeIn 0.5s ease-in-out;
}

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

.video-info {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
}

#video-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.video-details {
    flex: 1;
}

#video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

#video-author {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.success-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
    font-size: 14px;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.download-option {
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.download-option:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 1);
}

.download-option.hd {
    background: rgba(37, 99, 235, 0.8);
}

.download-option.hd:hover {
    background: rgba(37, 99, 235, 1);
}

.download-option.audio {
    background: rgba(16, 185, 129, 0.8);
}

.download-option.audio:hover {
    background: rgba(16, 185, 129, 1);
}

.hd-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.download-info {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.feature h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.feature p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tiktok-downloader {
        padding: 20px 16px;
    }
    
    .main-content h2 {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .download-form {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .paste-btn, .clear-btn {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
    }
    
    .video-info {
        flex-direction: column;
        text-align: center;
    }
    
    #video-thumbnail {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .download-options {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Success notification */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}