/* TikTok Downloader Styles */

.ttd-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.ttd-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ttd-header {
    text-align: center;
    margin-bottom: 30px;
}

.ttd-title {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ttd-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.ttd-form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
}

.ttd-form {
    margin-bottom: 0;
}

.ttd-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ttd-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.ttd-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ttd-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

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

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

.ttd-button-icon {
    font-size: 18px;
}

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

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

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

.ttd-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-weight: 500;
}

.ttd-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.ttd-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.ttd-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.ttd-video-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ttd-video-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.ttd-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ttd-video-details {
    flex: 1;
    min-width: 250px;
}

.ttd-video-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.ttd-video-author {
    font-size: 16px;
    color: #666;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttd-author-icon {
    font-size: 18px;
}

.ttd-video-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #888;
}

.ttd-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ttd-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
}

.ttd-download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.ttd-download-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.ttd-download-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ttd-item-header {
    margin-bottom: 15px;
}

.ttd-item-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.ttd-item-title {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ttd-download-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.ttd-download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ttd-download-btn.ttd-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

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

.ttd-download-btn.ttd-secondary {
    background: #4CAF50;
    color: #fff;
}

.ttd-download-btn.ttd-secondary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.ttd-footer {
    margin-top: 30px;
}

.ttd-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.ttd-feature {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ttd-feature-icon {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .ttd-wrapper {
        padding: 25px;
    }
    
    .ttd-title {
        font-size: 24px;
    }
    
    .ttd-input-group {
        flex-direction: column;
    }
    
    .ttd-input,
    .ttd-button {
        width: 100%;
    }
    
    .ttd-video-info {
        flex-direction: column;
    }
    
    .ttd-video-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    .ttd-download-grid {
        grid-template-columns: 1fr;
    }
    
    .ttd-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ttd-container {
        padding: 10px;
    }
    
    .ttd-form-wrapper,
    .ttd-result {
        padding: 20px;
    }
    
    .ttd-features {
        grid-template-columns: 1fr;
    }
}

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

.ttd-result {
    animation: fadeIn 0.5s ease;
}
