:root {
    /* Professional Modern Palette */
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --secondary-color: #8b5cf6;
    /* Violet 500 */
    --accent-color: #ec4899;
    /* Pink 500 */

    --text-main: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-light: #94a3b8;
    /* Slate 400 */

    --bg-color: #f8fafc;
    /* Slate 50 */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.05), 0 8px 16px -6px rgba(0, 0, 0, 0.05);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Blobs - More subtle */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 15s infinite ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    top: -200px;
    left: -200px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-color);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.header {
    text-align: center;
    margin-bottom: 10px;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 32px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 80px 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.04);
    transform: scale(1.01);
}

.drop-zone-content i {
    color: var(--primary-color);
    margin-bottom: 24px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 6px rgba(79, 70, 229, 0.2));
}

.drop-zone-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.browse-btn {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.browse-btn:hover {
    border-bottom-color: var(--primary-color);
}

/* URL Input */
.url-input-group {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.url-input-group input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    color: var(--text-main);
}

.url-input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.url-input-group input::placeholder {
    color: var(--text-light);
}

/* Buttons */
.primary-btn,
.secondary-btn {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.02em;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.secondary-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Filter Section */
.filter-section {
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.filter-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.filter-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

/* Standard Modern Checkboxes */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.checkbox-container:hover {
    color: var(--primary-color);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 22px;
    width: 22px;
    background-color: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-container:hover input~.checkmark {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.05);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) translate(0, -1px);
}

/* Gallery */
.gallery-section.hidden {
    display: none;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-header h2 {
    font-size: 1.5rem;
    color: var(--text-main);
}

.actions {
    display: flex;
    gap: 12px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.image-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.image-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
}

.image-preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f1f5f9;
    transition: var(--transition);
}

.image-card:hover .image-preview {
    transform: scale(1.05);
}

.image-info {
    padding: 16px;
    background: white;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.image-details {
    flex: 1;
    overflow: hidden;
}

.image-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.image-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    box-shadow: 0 0 0 2px rgba(203, 213, 225, 0.3);
}

.status-badge.success {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.status-badge.error {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.status-badge.processing {
    background: #eab308;
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

.download-single-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.download-single-btn.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.download-single-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
}

/* Remove Button */
.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ef4444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
    z-index: 10;
}

.image-card:hover .remove-btn {
    opacity: 1;
    transform: scale(1);
}

.remove-btn:hover {
    transform: scale(1.1);
    background: #fff;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2);
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    color: var(--text-light);
    margin-top: auto;
    padding-top: 40px;
    font-size: 0.9rem;
}

/* Loading Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .url-input-group {
        flex-direction: column;
    }

    .filter-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .actions {
        width: 100%;
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }
}