/* TikTok Downloader Plugin Styles */

.tiktok-downloader-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.tiktok-downloader-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);
    position: relative;
    overflow: hidden;
}

.tiktok-downloader-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

/* Photo Grid */
.photo-results {
    position: relative;
    z-index: 1;
    margin-top: 20px;
}

.images-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.photo-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.photo-card .video-thumbnail {
    margin-bottom: 15px;
    box-shadow: none;
}

.photo-card .video-thumbnail img {
    object-fit: cover;
}

.photo-card .video-actions {
    width: 100%;
}

.photo-card .download-btn {
    width: 100%;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.tiktok-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.tiktok-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 30px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tiktok-input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .tiktok-input-group {
        flex-direction: column;
    }
}

.tiktok-input {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.tiktok-input:focus {
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tiktok-input::placeholder {
    color: #999;
}

.tiktok-btn {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 150px;
}

.tiktok-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.tiktok-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

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

.tiktok-btn.loading {
    pointer-events: none;
}

.btn-text,
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.tiktok-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    position: relative;
    z-index: 1;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tiktok-message.error {
    background: #ff4757;
    color: #ffffff;
    border: 2px solid #ff6b7a;
}

.tiktok-message.success {
    background: #2ed573;
    color: #ffffff;
    border: 2px solid #7bed9f;
}

.tiktok-message.info {
    background: #5352ed;
    color: #ffffff;
    border: 2px solid #7f7eff;
}

.tiktok-result {
    position: relative;
    z-index: 1;
    display: none;
    animation: fadeInUp 0.4s ease;
}

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

.video-result-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-info {
    margin-bottom: 20px;
}

.video-title {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
    word-wrap: break-word;
}

.video-author {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.video-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    outline: none;
}

.download-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.download-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.download-btn.secondary {
    background: #f1f3f5;
    color: #667eea;
    border: 2px solid #667eea;
}

.download-btn.secondary:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tiktok-downloader-container {
        padding: 15px;
        margin: 20px auto;
    }

    .tiktok-downloader-wrapper {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .tiktok-title {
        font-size: 24px;
    }

    .tiktok-subtitle {
        font-size: 14px;
    }

    .tiktok-input,
    .tiktok-btn {
        padding: 14px 18px;
        font-size: 15px;
    }

    .tiktok-btn {
        width: 100%;
    }

    .video-result-card {
        padding: 20px;
    }

    .video-title {
        font-size: 18px;
    }

    .video-actions {
        flex-direction: column;
    }

    .download-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tiktok-downloader-wrapper {
        padding: 20px 15px;
    }

    .tiktok-title {
        font-size: 20px;
    }

    .video-result-card {
        padding: 15px;
    }
}

/* Loading animation for video thumbnail */
.video-thumbnail img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.video-thumbnail img[src] {
    animation: none;
    background: transparent;
}

/* Print styles */
@media print {
    .tiktok-downloader-wrapper {
        box-shadow: none;
        background: #f8f9fa;
    }

    .tiktok-btn {
        display: none;
    }
}

/* Facebook Content Type Badge */
.content-type-badge {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 5px;
}
