* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.download-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

#tiktokUrl {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    transition: border-color 0.3s ease;
}

#tiktokUrl:focus {
    outline: none;
    border-color: #667eea;
}

.download-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.features {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.feature .icon {
    font-size: 1.2rem;
}

.result-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

#videoThumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.video-details {
    flex: 1;
}

#videoTitle {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

#videoAuthor {
    color: #666;
    font-size: 1rem;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.option {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.option h4 {
    margin-bottom: 15px;
    color: #333;
}

.download-link {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.error-icon {
    font-size: 1.5rem;
}

footer {
    text-align: center;
    color: white;
    margin-top: 50px;
    opacity: 0.8;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .features {
        flex-direction: column;
        text-align: center;
    }
    
    .video-info {
        flex-direction: column;
        text-align: center;
    }
    
    #videoThumbnail {
        margin: 0 auto;
    }
}