/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(0, 0, 0, 0.07);
    --card-border-hover: rgba(0, 0, 0, 0.14);
    
    --primary-color: #e60023;
    --primary-hover: #cb001c;
    --primary-glow: rgba(230, 0, 35, 0.18);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    --font-family: 'Outfit', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --glow-primary: linear-gradient(135deg, #e60023 0%, #7c22ff 100%);
    --glow-secondary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

/* ==========================================
   RESET & BASICS
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================
   AMBIENT GLOWING BACKGROUND
   ========================================== */
.glow-bg {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 80vh;
    background: radial-gradient(circle at 50% 20%, rgba(230, 0, 35, 0.06) 0%, rgba(125, 18, 255, 0.03) 40%, rgba(248, 250, 252, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================
   GLASSMORPHISM PATTERNS
   ========================================== */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.glass:hover {
    border-color: var(--card-border-hover);
}

/* ==========================================
   HEADER SECTION
   ========================================== */
header {
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(230, 0, 35, 0.3);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo-text .highlight {
    background: var(--glow-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.theme-badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================
   HERO & DOWNLOADER FORM
   ========================================== */
.hero-section {
    text-align: center;
    padding: 5rem 0 3rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title .gradient-text {
    background: var(--glow-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    font-weight: 300;
}

.downloader-card {
    max-width: 750px;
    margin: 0 auto;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 1.1rem 1.25rem 1.1rem 3.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-inverse);
    border: none;
    padding: 1.1rem 2rem;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(255, 42, 75, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-icon {
    font-size: 0.95rem;
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-icon {
    transform: translateX(3px);
}

/* Error Message */
.error-msg {
    margin-top: 1rem;
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden {
    display: none !important;
}

/* ==========================================
   LOADING CONTAINER
   ========================================== */
.loading-container {
    text-align: center;
    padding: 3rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    position: relative;
    margin: 0 auto 1.5rem auto;
}

.double-bounce1, .double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.6;
    position: absolute;
    top: 0;
    left: 0;
    animation: sk-bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
    animation-delay: -1.0s;
}

.loading-text {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

@keyframes sk-bounce {
    0%, 100% { transform: scale(0.0) }
    50% { transform: scale(1.0) }
}

/* ==========================================
   PREVIEW CARD SECTION
   ========================================== */
.preview-container {
    max-width: 900px;
    margin: 2rem auto 4rem auto;
    animation: fadeIn var(--transition-medium);
}

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

.preview-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
}

.media-preview-box {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    overflow: hidden;
    position: relative;
}

#media-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Previews Render Styling */
.preview-image {
    max-width: 100%;
    max-height: 480px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.preview-video {
    width: 100%;
    max-height: 480px;
    border-radius: 12px;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: #000;
}

/* Carousel Preview Styling */
.carousel-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carousel-slide-container {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background var(--transition-fast);
    z-index: 10;
}

.carousel-nav-btn:hover {
    background: var(--primary-color);
    border-color: transparent;
}

.carousel-nav-btn.prev { left: 0.5rem; }
.carousel-nav-btn.next { right: 0.5rem; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--card-border);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Information Box */
.media-info-box {
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
}

.pin-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    background: rgba(230, 0, 35, 0.15);
    border: 1px solid rgba(230, 0, 35, 0.25);
    color: var(--primary-hover);
    margin-bottom: 1.25rem;
}

.pin-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.pin-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    font-weight: 300;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.pin-description::-webkit-scrollbar {
    width: 4px;
}
.pin-description::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.download-actions {
    margin-top: auto;
}

.download-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.button-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-download:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--card-border-hover);
    transform: translateX(3px);
}

.btn-download-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-download-title i {
    color: var(--primary-color);
}

.btn-download-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--card-border);
}

/* ==========================================
   HOW TO GUIDE SECTION
   ========================================== */
.guide-section {
    padding: 4rem 0;
    border-top: 1px solid var(--card-border);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step-card {
    padding: 2.25rem;
    position: relative;
    text-align: center;
}

.step-num {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
    box-shadow: 0 4px 10px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-inverse);
}

.step-card h3 {
    margin: 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
}

/* ==========================================
   FEATURES GRID SECTION
   ========================================== */
.features-section {
    padding: 2rem 0 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    padding: 2rem;
    gap: 1.5rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.8rem;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
}

.feature-icon.color-1 { color: #f87171; border-color: rgba(248, 113, 113, 0.2); }
.feature-icon.color-2 { color: #fb7185; border-color: rgba(251, 113, 133, 0.2); }
.feature-icon.color-3 { color: #60a5fa; border-color: rgba(96, 165, 250, 0.2); }
.feature-icon.color-4 { color: #c084fc; border-color: rgba(192, 132, 252, 0.2); }

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
}

/* ==========================================
   FOOTER SECTION
   ========================================== */
footer {
    background: #f1f5f9;
    border-top: 1px solid var(--card-border);
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--card-border);
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    max-width: 400px;
}

.footer-links h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    margin-bottom: 1rem;
}

.disclaimer-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.disclaimer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 300;
}

/* ==========================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================== */
@media (max-width: 900px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .media-info-box {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   CLIPBOARD PASTE & SUPPORTED TAGS
   ========================================== */
.btn-paste-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    border-radius: 6px;
    z-index: 5;
}

.btn-paste-icon:hover {
    color: var(--primary-hover);
    background: rgba(230, 0, 35, 0.08);
}

.input-group input {
    padding-right: 55px; /* Give space for paste icon */
}

.supported-formats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.supported-title {
    font-weight: 600;
}

.supported-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* ==========================================
   GUIDE TABS SYSTEM
   ========================================== */
.guide-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-main);
    border-color: var(--card-border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--text-inverse);
    border-color: transparent;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-content {
    display: none;
    animation: fadeIn var(--transition-medium);
}

.tab-content.active {
    display: block;
}

/* ==========================================
   INTERACTIVE FAQ ACCORDION
   ========================================== */
.faq-section {
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border-radius: 14px;
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.faq-question {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    user-select: none;
}

.faq-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.faq-item.active {
    border-color: rgba(230, 0, 35, 0.3);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-hover);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-medium) cubic-bezier(0, 1, 0, 1);
    background: rgba(0, 0, 0, 0.15);
}

.faq-answer p {
    padding: 1.25rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 300;
}

/* ==========================================
   TRUST & SECURITY SECTION
   ========================================== */
.security-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    text-align: center;
    border-color: rgba(16, 185, 129, 0.15);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.03);
}

.security-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.security-header-icon {
    font-size: 1.6rem;
    color: #10b981;
}

.security-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.badge-icon {
    font-size: 1.1rem;
}

.badge-icon.check { color: #10b981; }
.badge-icon.lock { color: #3b82f6; }
.badge-icon.privacy { color: #fbbf24; }

/* ==========================================
   TOAST / SNACKBAR SYSTEM
   ========================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-main);
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 20px rgba(230, 0, 35, 0.1);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-success .toast-icon { color: #10b981; }
.toast-error .toast-icon { color: #ef4444; }
.toast-info .toast-icon { color: #3b82f6; }

/* Mobile styling updates */
@media (max-width: 768px) {
    .security-badges {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .guide-tabs {
        flex-direction: row;
        width: 100%;
        gap: 0.5rem;
    }
    .tab-btn {
        flex-grow: 1;
        justify-content: center;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ==========================================
   SUPPORTED FORMATS DISPLAY
   ========================================== */
.formats-info-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.section-title-left {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.formats-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.formats-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.formats-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1.05rem;
    color: var(--text-main);
}

.format-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-top: 2px;
}
