/* CSS Variables - Instagram Theme */
:root {
    /* Colors */
    --bg-base: #fafafa;
    --bg-card: #ffffff;
    --bg-input: #f9f9f9;
    --bg-hover: #f0f0f0;
    
    --text-primary: #262626;
    --text-secondary: #8e8e8e;
    --text-muted: #c7c7c7;
    
    --border-color: #dbdbdb;
    --border-focus: #E1306C; /* IG Pink */
    
    /* Instagram Gradient */
    --ig-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --ig-gradient-hover: linear-gradient(45deg, #e6683c 0%, #dc2743 25%, #cc2366 50%, #bc1888 75%, #8a136c 100%);
    
    /* Status Colors */
    --success-green: #10b981;
    --error-red: #ed4956;
    --warning-yellow: #f59e0b;
    
    /* Utilities */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(225, 48, 108, 0.15);
    --shadow-lg: 0 12px 24px rgba(225, 48, 108, 0.2);
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 9999px;
    
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.25s ease-in-out;
}

html.dark-mode {
    --bg-base: #000000;
    --bg-card: #121212;
    --bg-input: #262626;
    --bg-hover: #363636;
    
    --text-primary: #f5f5f5;
    --text-secondary: #a8a8a8;
    --text-muted: #777777;
    
    --border-color: #363636;
    --border-focus: #E1306C;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    text-align: center;
    margin-bottom: 2.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: var(--ig-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-focus);
}

.lang-current {
    text-transform: uppercase;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.lang-dropdown.active {
    display: flex;
}

.lang-item {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lang-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.lang-item.active {
    color: var(--border-focus);
    font-weight: 600;
    background-color: rgba(225, 48, 108, 0.05);
}

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

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .input-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .input-icon {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .paste-btn {
    right: auto;
    left: 0.5rem;
}

[dir="rtl"] #url-input {
    padding: 1.25rem 3.5rem 1.25rem 9rem;
}

[dir="rtl"] .footer-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-col {
    text-align: right;
}

[dir="rtl"] .footer-col ul {
    padding-right: 0;
}

[dir="rtl"] .downloader-tabs {
    flex-direction: row-reverse;
}

[dir="rtl"] .tab-btn {
    border-radius: 0;
}

[dir="rtl"] .tab-btn:first-child {
    border-top-right-radius: 8px;
    border-top-left-radius: 0;
}

[dir="rtl"] .tab-btn:last-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 0;
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.theme-toggle-btn:hover {
    background-color: var(--bg-hover);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 101;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    padding: 6rem 0 8rem;
    text-align: center;
    flex: 1;
    background: var(--ig-gradient);
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
    position: relative;
    overflow: visible;
    margin-bottom: 4rem;
}

.hero h1 {
    color: #ffffff;
}

.subheadline {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.tagline {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--border-focus);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    margin-bottom: 0;
    white-space: nowrap;
}

/* Downloader Card - Clean Utility */
.downloader-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 3rem 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    transform: translateY(-6rem);
    margin-bottom: -6rem;
}

/* Download Tabs */
.download-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background-color: var(--bg-input);
    padding: 0.375rem;
    border-radius: var(--radius-full);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.tab-btn.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

.download-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.bulk-textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.05rem;
    font-family: var(--font-sans);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background-color: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    resize: vertical;
    min-height: 160px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.bulk-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(225, 48, 108, 0.1);
}

.link-icon {
    position: absolute;
    left: 1.5rem;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

#url-input {
    width: 100%;
    padding: 1.25rem 9rem 1.25rem 3.5rem;
    font-size: 1.05rem;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    background-color: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

#url-input:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(225, 48, 108, 0.1);
}

.paste-btn {
    position: absolute;
    right: 0.5rem;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.paste-btn:hover {
    background-color: var(--bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.download-btn {
    background: var(--ig-gradient);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-fast);
    box-shadow: 0 10px 20px -10px rgba(225, 48, 108, 0.5);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(225, 48, 108, 0.6);
}

.download-btn:hover::before {
    opacity: 1;
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px -5px rgba(225, 48, 108, 0.5);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    border-top-color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.8);
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.spinner.spinner-dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--border-focus);
    border-left-color: rgba(225, 48, 108, 0.6);
}

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

.supported-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.badge {
    background-color: var(--bg-input);
    color: var(--text-secondary);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Results Display */
.results-container {
    margin-top: 4rem;
    animation: slideUp 0.4s ease-out;
}

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

.result-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--ig-gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.result-preview {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-base);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
    border: 1px solid var(--border-color);
}

.result-preview img, .result-preview video {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.result-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    word-break: break-all;
    margin-bottom: 0;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--ig-gradient);
    color: white;
    box-shadow: 0 4px 10px -2px rgba(225, 48, 108, 0.3);
}

.btn-secondary {
    background-color: var(--bg-base);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    background: var(--ig-gradient-hover);
    box-shadow: 0 6px 15px -2px rgba(225, 48, 108, 0.4);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-focus);
}

/* Progress Bar Styles */
.progress-container {
    width: 100%;
    margin-top: 0.5rem;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: var(--bg-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--ig-gradient);
    width: 0%;
    transition: width 0.2s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* How It Works */
.how-it-works {
    padding: 8rem 0 5rem;
    background-color: var(--bg-base);
    position: relative;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    text-align: center;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    z-index: 0;
}

@media (max-width: 768px) {
    .steps-grid::before {
        display: none;
    }
}

.step-card {
    padding: 2.5rem 2rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: relative;
    transition: all var(--transition-normal);
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-color: var(--border-focus);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 0 8px var(--bg-base);
    transition: all var(--transition-fast);
}

.step-card:hover .step-number {
    background: var(--ig-gradient);
    color: white;
    border-color: transparent;
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Features */
.features {
    padding: 6rem 0;
    background-color: var(--bg-base);
    border-top: 1px solid var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-color: var(--border-focus);
}

.feature-card svg {
    color: var(--border-focus);
    margin-bottom: 1.5rem;
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

/* FAQ */
.faq {
    padding: 6rem 0;
    background-color: var(--bg-base);
    border-top: 1px solid var(--border-color);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-card);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.faq-item:hover {
    border-color: var(--border-focus);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chevron {
    color: var(--border-focus);
    transition: transform var(--transition-normal);
    background: rgba(225, 48, 108, 0.1);
    border-radius: 50%;
    padding: 4px;
}

.faq-item.active .chevron {
    transform: rotate(180deg);
    background: var(--border-focus);
    color: white;
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    padding: 0 2rem 1.5rem;
    max-height: 500px;
}

/* How to Use Steps */
@media (max-width: 768px) {
    .step-row {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.5rem !important;
    }
    .step-content {
        text-align: center !important;
    }
    .step-image {
        flex: 0 0 auto !important;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}

/* SEO Section */
.seo-section-wrapper {
    padding: 6rem 0;
    background-color: var(--bg-body);
    position: relative;
}

.seo-section-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.seo-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.seo-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--ig-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.seo-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.seo-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.seo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--ig-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.seo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: transparent;
}

.dark-mode .seo-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.seo-card:hover::before {
    opacity: 1;
}

.seo-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(245, 133, 41, 0.15), rgba(225, 48, 108, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #e1306c;
    transition: all 0.3s ease;
}

.seo-card:hover .seo-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    background: var(--ig-gradient);
    color: white;
}

.seo-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.seo-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background-color: var(--bg-card);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-about p {
    margin-top: 1rem;
    max-width: 320px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-input);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--ig-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.social-links a:hover svg {
    stroke: white;
}

.footer-links {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}

.link-group h4 {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.link-group ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-group a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.link-group a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.toast {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    color: var(--bg-base);
    font-weight: 500;
    font-size: 0.95rem;
    background-color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { border-left: 4px solid var(--success-green); }
.toast.error { border-left: 4px solid var(--error-red); }
.toast.warning { border-left: 4px solid var(--warning-yellow); }

.toast.fadeOut {
    animation: fadeOut 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    .footer-container {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        padding: 0.5rem 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 4rem 1rem 6rem;
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
        margin-bottom: 2rem;
    }

    .subheadline {
        font-size: 1.1rem;
    }

    .downloader-card {
        padding: 3rem 1.25rem 1.5rem;
        transform: translateY(-4rem);
        margin-bottom: -4rem;
        border-radius: var(--radius-md);
    }

    .tagline {
        font-size: 0.7rem;
        padding: 0.5rem 1rem;
        letter-spacing: 0.1em;
        width: 85%;
        text-align: center;
    }

    .download-tabs {
        width: 100%;
        max-width: 320px;
    }

    .tab-btn {
        flex: 1;
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-about p {
        margin: 1rem auto 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 2.5rem;
    }

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

    .action-btn {
        width: 100%;
    }
    
    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.85rem;
    }

    .hero {
        padding: 3rem 0.5rem 5rem;
    }

    .downloader-card {
        padding: 2.5rem 1rem 1.25rem;
    }

    .paste-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    #url-input {
        padding: 1.1rem 1rem 1.1rem 3rem;
        font-size: 0.95rem;
    }

    .download-btn {
        padding: 1.1rem 1.5rem;
        font-size: 1rem;
    }

    .bulk-textarea {
        min-height: 120px;
        padding: 1rem;
        font-size: 0.95rem;
    }

    .feature-card, .step-card {
        padding: 1.5rem;
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%, 150%);
    max-width: 650px;
    width: calc(100% - 2rem);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(225, 48, 108, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
    opacity: 0;
}
html.dark-mode .cookie-banner {
    background: rgba(30, 30, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(225, 48, 108, 0.2);
}
.cookie-banner.show {
    transform: translate(-50%, 0);
    opacity: 1;
}
.cookie-content {
    flex: 1;
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}
.cookie-icon {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
.cookie-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}
.cookie-content a {
    color: var(--border-focus);
    font-weight: 600;
    text-decoration: none;
    position: relative;
}
.cookie-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--ig-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.cookie-content a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.cookie-buttons {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: flex-end;
}
.cookie-btn {
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.cookie-btn.accept {
    background: var(--ig-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
}
.cookie-btn.accept:hover {
    background: var(--ig-gradient-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.4);
}
.cookie-btn.reject {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.cookie-btn.reject:hover {
    background-color: var(--bg-hover);
    transform: translateY(-2px);
}
@media (min-width: 768px) {
    .cookie-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem 2rem;
    }
    .cookie-buttons {
        flex-shrink: 0;
    }
}
