/* ===== CSS Variables ===== */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border-light: #e2e8f0;
    --accent: #6366f1;
    --accent-dark: #4f46e5;
    --accent-light: #818cf8;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ===== Scrollbar Personalizado ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== Animaciones Globales ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all 0.3s;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.75rem;
    animation: bounce 2s ease-in-out infinite;
}

.logo .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.theme-btn:hover {
    background: var(--accent);
    color: white;
    transform: rotate(15deg);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ===== Hero Section ===== */
.hero {
    margin-top: 72px;
    padding: 5rem 2rem;
    text-align: center;
    background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    animation: fadeIn 0.8s ease-out;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.badge-new {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat {
    text-align: center;
    animation: fadeIn 0.8s ease-out backwards;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }
.stat:nth-child(4) { animation-delay: 0.4s; }

.stat .number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.stat .label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ===== Tool Container ===== */
.tool-container {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* ===== Input Tabs ===== */
.input-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn i {
    font-size: 1.125rem;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s;
}

.tab-btn:hover {
    color: var(--accent);
}

.tab-btn.active {
    color: var(--accent);
}

.tab-btn.active::after {
    width: 100%;
}

/* ===== URL Zone ===== */
.url-zone {
    border: 2px solid var(--border-light);
    border-radius: 2rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-card);
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease-out;
}

.url-zone:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-md);
}

.url-icon i {
    font-size: 4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.url-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.url-zone p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.url-input-group {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.url-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 14px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.url-note {
    font-size: 0.75rem;
    margin-top: 1rem;
    color: var(--text-tertiary);
}

.url-examples {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.example-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 0.375rem 1rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.example-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* ===== Drop Zone ===== */
.drop-zone {
    border: 3px dashed var(--accent-light);
    border-radius: 2rem;
    padding: 5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-card);
    cursor: pointer;
    margin-bottom: 0;
    animation: fadeIn 0.6s ease-out;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

.drop-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.drop-icon i {
    font-size: 5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 30px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.drop-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.drop-zone p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.drop-note {
    font-size: 0.75rem;
    margin-top: 1rem;
    color: var(--text-tertiary);
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    border-radius: 14px;
    padding: 0.875rem 2rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Tab Panels ===== */
.tab-panel {
    animation: fadeIn 0.3s ease-out;
}

/* ===== Batch Processing Panel ===== */
.batch-panel {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease-out;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.batch-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.batch-header-left i {
    font-size: 1.25rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.batch-badge {
    background: var(--accent-light);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-outline-small {
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.btn-outline-small:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.batch-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.batch-stats-item {
    text-align: center;
}

.batch-stats-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.batch-stats-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.batch-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.batch-item {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
    animation: fadeIn 0.3s ease-out;
}

.batch-item.processing {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.batch-item.completed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.batch-item.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.batch-item-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.batch-status {
    font-size: 1.25rem;
}

.batch-info {
    flex: 1;
}

.batch-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.batch-size {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.batch-progress {
    margin-top: 0.5rem;
    height: 3px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.batch-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.3s;
}

.batch-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ===== Processing Grid ===== */
.processing-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .processing-grid {
        grid-template-columns: 1fr;
    }
}

.preview-card,
.controls-card {
    background: var(--bg-card);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeIn 0.6s ease-out;
}

.preview-card:hover,
.controls-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.25rem;
}

.card-header h3 {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-icon {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: rotate(90deg);
}

/* ===== Canvas Preview ===== */
.canvas-wrapper {
    position: relative;
    background: var(--bg-elevated);
    padding: 1rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.preview-canvas {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    cursor: crosshair;
    transition: transform 0.2s;
    border-radius: 8px;
}

.zoom-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    padding: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.zoom-controls button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.3s;
}

.zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.zoom-controls span {
    color: white;
    min-width: 50px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Image Info ===== */
.image-info {
    padding: 1rem 1.5rem;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-light);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.info-row span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-row .info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Control Groups ===== */
.control-group {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s;
}

.control-group:hover {
    background: rgba(99, 102, 241, 0.02);
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.control-group label i {
    color: var(--accent);
}

/* Format Buttons */
.format-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.format-btn {
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    background: var(--bg-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.format-btn i {
    font-size: 1rem;
}

.format-btn .format-badge {
    font-size: 0.6rem;
    background: var(--accent);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 100px;
    margin-top: 0.25rem;
}

.format-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: scale(1.02);
}

.format-btn:hover:not(.active) {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Slider */
.slider-container {
    padding: 0.5rem 0;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, var(--accent-light) 0%, var(--accent) 85%);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    border: 2px solid white;
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

/* Quality Badge */
.badge-quality {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    background: var(--bg-elevated);
    color: var(--accent);
    font-weight: 600;
}

.size-preview {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-radius: 8px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-preview i {
    color: var(--accent);
}

.size-compare {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--success);
}

/* Toggle Switch */
.toggle-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.toggle-header label {
    margin-bottom: 0;
    flex: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.4s;
    border-radius: 34px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider.round {
    background-color: var(--accent);
}

input:checked + .slider.round:before {
    transform: translateX(26px);
}

/* Resize Panel */
.resize-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    transition: all 0.3s;
}

.resize-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-row label {
    margin-bottom: 0;
    min-width: 60px;
}

.option-row select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
}

.dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.input-group label {
    margin-bottom: 0;
    font-size: 0.75rem;
    font-weight: 500;
}

.input-group input {
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.input-group .unit {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.preset-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.preset-btn {
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn i {
    font-size: 0.875rem;
}

.filter-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: scale(1.05);
}

.filter-btn:hover:not(.active) {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Convert Button */
.btn-convert {
    margin: 1.5rem;
    padding: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: 14px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: calc(100% - 3rem);
    position: relative;
    overflow: hidden;
}

.btn-convert::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-convert:hover::before {
    left: 100%;
}

.btn-convert:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Progress Bar */
.progress-bar {
    margin: 1rem 1.5rem 1.5rem;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
}

/* History Section */
.history-section {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.6s ease-out;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.25rem;
}

.section-header h3 {
    flex: 1;
    font-size: 1.125rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.3s;
}

.btn-text:hover {
    color: var(--danger);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.history-item {
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.history-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.history-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.history-item p {
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.history-item small {
    font-size: 0.6rem;
    color: var(--text-tertiary);
}

.history-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.history-item:hover .history-delete {
    opacity: 1;
}

.history-delete:hover {
    background: var(--danger);
    transform: scale(1.1);
}

/* Shortcuts Info */
.shortcuts-info {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 12px;
    text-align: center;
}

.shortcuts-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.shortcuts-content i {
    color: var(--accent);
}

kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Features Section */
.features-section {
    margin-top: 5rem;
    padding: 3rem 0;
}

.features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.features-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.features-header p {
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 1.5rem;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-card i {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: var(--bg-card);
    margin-top: 5rem;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-logo i {
    font-size: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-tagline {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-column h4 {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-column a {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-tech {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-elevated);
    border-radius: 100px;
    transition: all 0.3s;
}

.tech-badge:hover {
    transform: translateY(-2px);
    background: var(--accent);
    color: white;
}

.tech-badge:hover i {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.footer-bottom i {
    color: var(--danger);
    animation: pulse 1.5s infinite;
}

/* Loading Overlay */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Toast Container */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .btn-text {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .format-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-tech {
        justify-content: center;
    }
    
    .shortcuts-content {
        gap: 0.5rem;
    }
    
    .shortcuts-content span:not(:first-child) {
        display: none;
    }
    
    .batch-actions {
        flex-direction: column;
    }
    
    .batch-stats {
        gap: 1rem;
        justify-content: center;
    }
    
    .input-tabs {
        justify-content: center;
    }
    
    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .url-zone {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 0 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
    }
    
    .preset-buttons {
        justify-content: center;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .tab-btn i {
        margin: 0;
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .drop-zone,
    .url-zone,
    .input-tabs,
    .batch-panel,
    .features-section,
    footer,
    .zoom-controls,
    .shortcuts-info {
        display: none;
    }
    
    .processing-grid {
        display: block;
    }
    
    .preview-canvas {
        max-width: 100%;
    }
}
/* ===== Fix para el progreso del ZIP ===== */
/* Asegurar que el contenedor y sus hijos estén ocultos por defecto */
#zipProgress,
#zipProgress .progress-fill,
#zipProgress .progress-text {
    display: none;
}

/* Cuando el contenedor se muestre (vía JavaScript con style.display = 'block'),
   forzar que se muestre correctamente y sus elementos internos también */
#zipProgress[style*="display: block"] {
    display: block !important;
}

#zipProgress[style*="display: block"] .progress-fill,
#zipProgress[style*="display: block"] .progress-text {
    display: block;
}