
/*
Theme Name: IG Downloader
Author: Your Name
Description: Instagram Video Downloader Theme chuẩn WordPress, tích hợp đầy đủ giao diện downloader
Version: 1.0
Text Domain: igdownloader
*/
/* CSS Custom Properties */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --hero-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --gray-text: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    background: var(--hero-gradient);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem !important;
    font-weight: 700;
}

.language-selector {
    color: white;
    opacity: 0.8;
}

/* Content Tabs */
.content-tabs {
    margin-bottom: 2rem;
}

.content-tabs .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin: 0 0.25rem;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
}

.content-tabs .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.content-tabs .btn-check:checked + .btn-outline-light {
    background: white;
    color: #4facfe;
    border-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Download Form */
.download-form {
    max-width: 700px;
    margin: 0 auto;
}

.input-group-combined {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-container {
    position: relative;
    flex: 1;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    padding: 0;
    border: 2px solid transparent;
    transition: var(--transition);
}

.input-container:focus-within {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #6c757d;
    z-index: 2;
}

.main-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 1rem 6rem 1rem 2.5rem;
    font-size: 1rem;
    height: 50px;
    flex: 1;
    border-radius: var(--border-radius);
}

.main-input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.btn-inside {
    position: absolute;
    right: 0.75rem;
    background: #4facfe;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    z-index: 3;
}

.btn-inside:hover {
    background: #3d8bfe;
    transform: translateY(-1px);
}

.paste-btn {
    background: #4facfe;
}

.clear-btn {
    background: #dc3545;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.main-download-btn {
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    white-space: nowrap;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(45deg, #20c997, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* Loading State */
.loading-state {
    text-align: center;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Preview Section */
.preview-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.preview-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.preview-header {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.preview-meta {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Single Content */
.single-content {
    text-align: center;
}

.content-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.main-thumbnail {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.content-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.download-section {
    margin-top: 1.5rem;
}

/* Content Grid for Carousel */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.content-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.content-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.item-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.item-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.content-item:hover .item-thumbnail {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.item-actions {
    padding: 1rem;
    text-align: center;
}

.item-actions .btn {
    width: 100%;
    font-weight: 600;
}

/* Bulk Download */
.bulk-download {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-text);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.feature-description {
    color: var(--gray-text);
    line-height: 1.6;
}

/* How to Section */
.how-to-section {
    padding: 5rem 0;
}

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

.step-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.step-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.5rem;
    text-align: center;
}

.step-header h5 {
    margin: 0;
    color: white !important;
    font-weight: 600;
}

.step-content {
    padding: 2rem;
}

.step-item {
    margin-bottom: 1.5rem;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-item strong {
    display: block;
    color: var(--dark-text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.step-item p {
    color: var(--gray-text);
    margin: 0;
    line-height: 1.6;
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-danger {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
}

.alert-success {
    background: linear-gradient(45deg, #51cf66, #40c057);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .content-tabs .btn-outline-light {
        margin: 0.25rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .input-container{
        width: 100%;
    }
    
    .input-group-combined {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .main-download-btn {
        width: 100%;
        padding: 1rem;
    }
    
    .main-input {
        font-size: 1rem;
        padding: 0.875rem 5rem 0.875rem 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 60vh;
    }
    
    .content-tabs .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .download-form .input-group {
        flex-direction: column;
    }
    
    .download-form .input-group > * {
        border-radius: var(--border-radius) !important;
        margin-bottom: 0.5rem;
    }
    
    .download-form .input-group > *:last-child {
        margin-bottom: 0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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