/* Style Sheet - InstaSnap Downloader & Automation Studio */

/* CSS Reset & Variables */
:root {
    --bg-dark: hsl(250, 24%, 6%);
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    
    --text-primary: hsl(0, 0%, 95%);
    --text-secondary: hsl(250, 10%, 70%);
    --text-muted: hsl(250, 10%, 50%);
    
    --accent-glow: rgba(220, 39, 67, 0.25);
    
    --insta-grad: linear-gradient(135deg, #f99f1b 0%, #dc2743 50%, #bc1888 100%);
    --primary-grad: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --btn-grad-hover: linear-gradient(135deg, #f5a64a 0%, #eb774c 25%, #e63953 50%, #d63776 75%, #c72993 100%);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background floating glow blobs */
.glow-bg-1, .glow-bg-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}

.glow-bg-1 {
    background: radial-gradient(circle, #bc1888 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation: floatGlow1 25s infinite alternate ease-in-out;
}

.glow-bg-2 {
    background: radial-gradient(circle, #f09433 0%, transparent 70%);
    bottom: 10%;
    right: -10%;
    animation: floatGlow2 25s infinite alternate ease-in-out;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 150px) scale(1.2); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-150px, -100px) scale(0.9); }
}

/* Utility Containers */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography & Gradient Text */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--insta-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Header & Navigation */
header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(8, 7, 13, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.logo svg {
    color: #dc2743;
}

.logo span {
    background: var(--insta-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 6px 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--text-primary);
    font-weight: 700;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--insta-grad);
    border-radius: 2px;
}

/* Main layouts */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 90px;
    padding-top: 60px;
    padding-bottom: 80px;
}

/* Tab Views */
.tab-view {
    display: block;
}

.tab-view.hidden {
    display: none !important;
}

/* Hero Section */
.hero-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
}

/* Downloader Card & Input form */
.downloader-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 
                0 0 50px var(--accent-glow);
    transition: border-color var(--transition-fast);
}

.downloader-card:focus-within {
    border-color: rgba(220, 39, 67, 0.4);
}

.input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
    color: var(--text-muted);
}

.input-wrapper input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    padding: 14px 8px;
    min-width: 100px;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    outline: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.btn-primary {
    background: var(--primary-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: var(--btn-grad-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.45);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
}

.btn-secondary-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary-outline:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

/* Toast Messages */
.toast-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(20, 18, 30, 0.95);
    border-left: 4px solid #dc2743;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 300px;
    max-width: 450px;
    text-align: left;
}

@keyframes toastIn {
    0% { transform: translateY(50px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.toast.success {
    border-left-color: #2ec4b6;
}

.toast.error {
    border-left-color: #e63946;
}

/* Loader Container */
.loader-container {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loader-container p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Double Bounce Spinner */
.spinner {
    width: 50px;
    height: 50px;
    position: relative;
}

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

.double-bounce2 {
    animation-delay: -1.0s;
    background-color: #bc1888;
}

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

/* Results Display Container */
.result-container {
    margin-top: 40px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.result-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    text-align: left;
}

.result-preview {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    position: relative;
    aspect-ratio: 9 / 12;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.badge {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(220, 39, 67, 0.15);
    color: #dc2743;
    border: 1px solid rgba(220, 39, 67, 0.3);
}

.result-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.result-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.btn-download-primary {
    background: var(--primary-grad);
    color: white;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 15px;
}

.btn-download-primary:hover {
    background: var(--btn-grad-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.45);
}

/* Features Grid */
.features-section {
    text-align: center;
}

.section-title {
    font-size: 38px;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 30px;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(220, 39, 67, 0.1);
    color: #dc2743;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Steps / How to Section */
.how-to-section {
    text-align: center;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    position: relative;
    padding: 40px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: left;
}

.step-num {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, rgba(220, 39, 67, 0.25) 0%, transparent 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: absolute;
    top: 20px;
    right: 20px;
}

.step-card h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-trigger {
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.faq-trigger .chevron {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    padding: 0 24px;
}

.faq-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-bottom: 24px;
}

/* Active FAQ state */
.faq-item.active .faq-trigger .chevron {
    transform: rotate(180deg);
    color: #dc2743;
}

.faq-item.active .faq-content {
    max-height: 1000px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), padding 0.3s ease;
}

/* ==========================================
   VISUAL AUTOMATION STUDIO DASHBOARD STYLES
   ========================================== */
.auto-header {
    text-align: center;
    margin-bottom: 40px;
}

.auto-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
}

.auto-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.auto-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
    margin-top: 10px;
}

.auto-col {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pane-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
}

/* Refresh Icon Button Styling & Animation */
.btn-icon-refresh {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    outline: none;
}

.btn-icon-refresh:hover {
    color: #dc2743;
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon-refresh svg {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon-refresh:hover svg {
    transform: rotate(180deg);
}

.btn-icon-refresh.spinning svg {
    animation: spin 1s linear infinite;
}

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

.pane-header svg {
    color: #dc2743;
}

.pane-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Category Filters Horizontal Pill Box */
.category-filters-wrapper {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

.category-filters-wrapper::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.cat-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 14px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}

.cat-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.cat-pill.active {
    background: var(--insta-grad);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
}

/* 1. Discover Pane / Trending lists */
.trending-list-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.trending-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.trending-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.pane-loader {
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.trend-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    position: relative;
}

.trend-card.hidden {
    display: none !important;
}

.trend-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.trend-card.selected {
    border-color: #dc2743;
    box-shadow: 0 0 15px rgba(220, 39, 67, 0.25);
    background: rgba(220, 39, 67, 0.03);
}

.trend-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 135px; /* Robust fallback height for all browsers */
    position: relative;
    overflow: hidden;
    background: #000;
}

.trend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.virality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(16,185,129,0.3);
}

.trend-views-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.trend-meta {
    padding: 12px;
}

.trend-meta h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-tags {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* 2. Studio Editor Pane */
.editor-workspace {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-preview-wrapper {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}

.video-preview-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.video-preview-wrapper video.active {
    display: block;
}

.watermark-overlay {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 0);
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 10;
    display: none;
}

.watermark-overlay.active {
    display: block;
}

.workspace-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 30px;
    color: var(--text-muted);
    text-align: center;
}

.workspace-placeholder p {
    font-size: 12px;
    line-height: 1.5;
}

/* Custom Editor Inputs */
.editor-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.editor-controls.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.control-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.control-group input[type="text"], .publisher-form select, .publisher-form textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 12px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-fast);
}

.control-group input[type="text"]:focus, .publisher-form select:focus, .publisher-form textarea:focus {
    border-color: #dc2743;
}

.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    text-align: left;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-group label {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.slider-group label span {
    font-weight: 600;
    color: #dc2743;
}

.slider-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc2743;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(220, 39, 67, 0.5);
    transition: transform 0.1s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 3. Publisher & Queue Pane */
.publisher-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.publisher-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.publisher-form.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.publisher-form select option {
    background: #0d0c15;
    color: var(--text-primary);
}

.publisher-form input[type="datetime-local"] {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 12px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.action-buttons-stack button {
    width: 100%;
}

.w-full {
    width: 100%;
}

/* Progress Sim logs */
.progress-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--insta-grad);
    border-radius: 10px;
    transition: width 0.3s ease;
}

#progress-step-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Scheduled Queue Box */
.scheduled-queue-box {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.scheduled-queue-box h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.queue-list::-webkit-scrollbar {
    width: 4px;
}

.queue-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.empty-queue-msg {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
}

.queue-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.queue-header span.q-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.q-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.q-badge.scheduled {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.q-badge.posting {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.queue-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-time {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border-color);
    background: #040407;
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-info {
    max-width: 500px;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Animation Utilities */
.hidden {
    display: none !important;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-delayed {
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
    animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive Breakpoints */

@media (max-width: 1100px) {
    .auto-grid {
        grid-template-columns: 1fr 1fr;
    }
    .publish-pane {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 44px;
    }
    
    .features-grid, .steps-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    
    .result-preview {
        max-width: 260px;
        width: 100%;
    }
    
    .badge {
        align-self: center;
    }
    
    .result-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .auto-grid {
        grid-template-columns: 1fr;
    }
    .publish-pane {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    header {
        position: relative;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .navbar {
        height: auto;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 12px 4px;
    }
    
    .logo {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }
    
    .theme-toggle-btn {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }
    
    .nav-links {
        grid-column: 1 / span 2;
        grid-row: 2;
        display: flex !important;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 6px;
        gap: 8px;
        justify-content: flex-start;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    
    .nav-links a {
        white-space: nowrap;
        font-size: 12px;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--border-color);
        border-radius: 50px;
        color: var(--text-secondary);
    }
    
    .nav-links a.active {
        background: var(--primary-grad) !important;
        color: #fff !important;
        border-color: transparent !important;
    }
    
    main {
        padding-top: 20px;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .downloader-card {
        padding: 4px;
    }
    
    .input-wrapper {
        flex-direction: column;
        gap: 4px;
        padding: 4px;
    }
    
    .input-icon {
        display: none; /* Save space on mobile */
    }
    
    .input-wrapper input {
        width: 100%;
        text-align: center;
        padding: 10px 4px;
    }
    
    .btn-group {
        width: 100%;
        flex-direction: column;
        gap: 6px;
    }
    
    .btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-download-primary {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn-secondary-outline {
        width: 100%;
    }
    
    .result-card {
        gap: 20px;
    }
    
    .result-title {
        font-size: 20px;
    }
    
    .result-container {
        padding: 16px;
    }
    
    .faq-trigger {
        padding: 16px;
        font-size: 14px;
    }
    
    .faq-content {
        padding: 0 16px;
    }
    
    .faq-content p {
        font-size: 13px;
        padding-bottom: 16px;
    }
    
    .toast-box {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        min-width: 0;
        width: 100%;
    }
}

/* ==========================================
   LIGHT MODE STYLING OVERRIDES
   ========================================== */
body.light-mode {
    --bg-dark: hsl(250, 20%, 97%);
    --bg-card: rgba(0, 0, 0, 0.03);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    
    --text-primary: hsl(250, 24%, 6%);
    --text-secondary: hsl(250, 10%, 25%);
    --text-muted: hsl(250, 10%, 45%);
    --accent-glow: rgba(220, 39, 67, 0.05);
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .logo, 
body.light-mode .nav-links a {
    color: var(--text-secondary);
}

body.light-mode .nav-links a.active,
body.light-mode .nav-links a:hover {
    color: var(--text-primary);
}

body.light-mode .glow-bg-1, 
body.light-mode .glow-bg-2 {
    opacity: 0.07;
}

body.light-mode .downloader-card,
body.light-mode .result-card,
body.light-mode .glass-card,
body.light-mode .faq-item,
body.light-mode .trend-card,
body.light-mode .queue-card,
body.light-mode .auto-col {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .trend-card.selected {
    border-color: #dc2743 !important;
    background: rgba(220, 39, 67, 0.02) !important;
}

body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #111 !important;
}

body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus {
    border-color: #dc2743 !important;
    background: #ffffff !important;
}

body.light-mode option {
    background: #ffffff !important;
    color: #111 !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode .pane-header h3,
body.light-mode .result-title,
body.light-mode .faq-trigger span {
    color: #111111 !important;
}

body.light-mode #oauth-modal > div,
body.light-mode #bulk-modal > div,
body.light-mode #business-auth-modal > div {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #chat-messages-container {
    background: rgba(0, 0, 0, 0.02) !important;
}

body.light-mode #chat-message-log > div:not([style*="align-self: flex-end"]) > div {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

body.light-mode footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

/* ==========================================
   SNAPSAVE PRO MULTI-DOWNLOADER STYLES
   ========================================== */
.snapsave-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
}

.snapsave-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 16px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    background: var(--insta-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    padding: 10px 12px 6px 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    color: #fff;
    background: var(--primary-grad);
    font-weight: 600;
}

.snapsave-content-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.snapsave-content-header {
    text-align: left;
    margin-bottom: 10px;
}

.adsense-ready-slot {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adsense-ready-slot.top-slot {
    margin-bottom: 10px;
}

.snapsave-grid-section {
    margin-top: 40px;
}

.grid-title {
    font-size: 22px;
    margin-bottom: 24px;
    text-align: left;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.platform-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.platform-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.platform-card h4 {
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.platform-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.snapsave-seo-content {
    margin-top: 40px;
    padding: 30px;
    border-radius: var(--radius-md);
    line-height: 1.7;
    text-align: left;
}

.snapsave-seo-content h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.snapsave-seo-content h3 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.snapsave-seo-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
}

.snapsave-seo-content ol, .snapsave-seo-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.snapsave-seo-content li {
    margin-bottom: 8px;
}

/* Blog Styles */
.blog-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    text-align: left;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.blog-card-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(220,39,67,0.1) 0%, rgba(188,24,136,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.blog-card-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.blog-card-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.article-content h1 {
    font-size: 36px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.article-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.article-body h2 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.article-body ul {
    margin-left: 24px;
    margin-bottom: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Light mode styles override */
body.light-mode .snapsave-sidebar {
    background: #ffffff !important;
}

body.light-mode .sidebar-link:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .sidebar-link.active {
    color: #ffffff !important;
}

body.light-mode .platform-card,
body.light-mode .blog-card,
body.light-mode .article-content,
body.light-mode .contact-form-wrapper,
body.light-mode .policy-wrapper {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .platform-card:hover,
body.light-mode .blog-card:hover {
    background: rgba(0, 0, 0, 0.01) !important;
}

body.light-mode .adsense-ready-slot {
    border-color: rgba(0, 0, 0, 0.12) !important;
    background: rgba(0, 0, 0, 0.005) !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .snapsave-layout {
        grid-template-columns: 1fr;
    }
    .snapsave-sidebar {
        position: static;
        max-height: none;
    }
}

