/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Styles */
:root {
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-active: #6d28d9;
    --secondary-color: #1e1b2e;
    --accent-color: #00d4ff;
    --text-color: #e2e8f0;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    --text-muted: #64748b;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(30, 27, 46, 0.8);
    --bg-glass: rgba(139, 92, 246, 0.1);
    --border-color: #334155;
    --border-glass: rgba(139, 92, 246, 0.2);
    --success-color: #00ff88;
    --error-color: #ff4757;
    --warning-color: #ffa502;
    --info-color: #00d4ff;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --box-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --box-shadow-xl: 0 32px 64px rgba(0, 0, 0, 0.5);
    --box-shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --backdrop-blur: blur(20px);
    --backdrop-blur-sm: blur(10px);
    --glass-bg: rgba(30, 27, 46, 0.6);
    --glass-border: rgba(139, 92, 246, 0.3);
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    --gradient-mesh: 
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    --gradient-button: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --z-index-modal: 1000;
    --z-index-dropdown: 100;
    --z-index-tooltip: 200;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --glass-bg: rgba(0, 0, 0, 0.25);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    background-size: 100% 100%;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    scroll-behavior: smooth;
    overflow-x: hidden;
    position: relative;
}

/* Add a subtle animated glow effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: subtleGlow 20s ease-in-out infinite alternate;
}

@keyframes subtleGlow {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Animated background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation: float 25s infinite ease-in-out;
    filter: blur(1px);
}

.particles::before {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
}

.particles::after {
    bottom: 20%;
    right: 15%;
    animation-delay: 12s;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-30px) rotate(120deg);
    }

    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-index-dropdown);
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem 0;
    transition: all var(--transition-normal);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none; /* This prevents the pseudo-element from blocking clicks */
}

.header:hover::before {
    opacity: 1;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    margin: -0.5rem;
    position: relative;
    z-index: 10; /* Ensure logo is above other header elements */
}

.logo:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.logo:active {
    transform: translateY(0);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
}

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

.nav-link {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

.nav-link:hover {
    opacity: 1;
}

/* Main content */
.main {
    padding-top: 100px;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    display: block;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    opacity: 1;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-white);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Upload Section */
.upload-section {
    margin-bottom: 3rem;
}

/* Upload Tabs */
.upload-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    backdrop-filter: var(--backdrop-blur-sm);
    -webkit-backdrop-filter: var(--backdrop-blur-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0.7;
    flex: 1;
    max-width: 200px;
}

.tab-button.active {
    background: var(--gradient-button);
    opacity: 1;
    box-shadow: 0 2px 10px rgba(74, 107, 255, 0.3);
}

.tab-button:hover:not(.active) {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

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

/* Tab Content */
.tab-content {
    display: none;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-white);
    font-weight: 600;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

h2 {
    margin: 20px 0 15px;
    color: var(--text-white);
    font-weight: 500;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.01em;
}

/* Upload Area */
.upload-area {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 2px dashed var(--border-glass);
    border-radius: var(--border-radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    will-change: transform;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    isolation: isolate;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

.upload-text {
    font-size: 1rem;
    color: var(--text-white);
    opacity: 0.8;
    margin: 0;
}

.upload-formats {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.format-tag {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--backdrop-blur-sm);
    -webkit-backdrop-filter: var(--backdrop-blur-sm);
}

.upload-limit {
    font-size: 0.875rem;
    color: var(--text-white);
    opacity: 0.6;
    margin: 0;
}

/* URL Input Area */
.url-input-area {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 2px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-normal);
}

.url-input-area.dragover {
    border-color: var(--primary-color);
    background: var(--bg-glass);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--box-shadow-glow);
}

.url-input-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

.url-input-wrapper {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin: 1.5rem 0;
}

.url-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background: var(--bg-primary);
    backdrop-filter: var(--backdrop-blur-sm);
    -webkit-backdrop-filter: var(--backdrop-blur-sm);
    color: var(--text-color);
    transition: all var(--transition-normal);
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    background: var(--bg-secondary);
}

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

.url-load-btn {
    white-space: nowrap;
    min-width: 140px;
}

.url-examples {
    margin: 1rem 0;
}

.url-examples-title {
    font-size: 0.9rem;
    color: var(--text-white);
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.url-examples-list {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.example-tag {
    background: var(--bg-secondary);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    opacity: 0.8;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--bg-glass);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--box-shadow-glow);
}

.upload-area::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.upload-area:hover::after {
    transform: translateX(100%);
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.upload-area:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.upload-area:active {
    transform: translateY(-1px) scale(1.005);
}

.upload-icon {
    font-size: clamp(48px, 8vw, 56px);
    margin-bottom: 20px;
    color: var(--primary-color);
    opacity: 0.8;
    transition: all var(--transition-normal);
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.upload-area:hover .upload-icon {
    opacity: 1;
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 8px 20px rgba(99, 102, 241, 0.6));
    animation-play-state: paused;
}

.file-info {
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--text-light);
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

.upload-area:hover .file-info {
    opacity: 1;
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-size: 0.95em;
    letter-spacing: 0.01em;
}

input[type="number"],
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.1);
}

input[type="number"]:invalid {
    border-color: var(--error-color);
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a5bd9 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 10px;
    will-change: transform;
    min-height: 44px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.btn:hover {
    background: linear-gradient(135deg, #3a5bd9 0%, #2c4bb3 100%);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(74, 107, 255, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 107, 255, 0.2);
}

.btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(74, 107, 255, 0.3);
}

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

/* Preview Section */
.preview {
    margin-top: 30px;
    text-align: center;
}

.gif-preview {
    max-width: 100%;
    margin: 20px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gif-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Status Messages */
.status {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.status.success {
    background: rgba(40, 167, 69, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status.error {
    background: rgba(220, 53, 69, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-icon {
        font-size: 40px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .btn {
        width: 100%;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 20px 10px;
    }

    .upload-icon {
        font-size: 36px;
    }

    h1 {
        font-size: 1.5em;
    }
}

/* Options Section */
.options-section {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.options-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.options-header {
    text-align: center;
    margin-bottom: 2rem;
}

.options-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0 0 0.5rem 0;
}

.options-icon {
    font-size: 1.5rem;
}

.options-description {
    color: var(--text-white);
    opacity: 0.8;
    margin: 0;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: left 0.5s ease;
}

.option-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-glow);
    border-color: var(--primary-color);
}

.option-card:hover::before {
    left: 100%;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.label-icon {
    font-size: 1rem;
}

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

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--bg-primary);
    backdrop-filter: var(--backdrop-blur-sm);
    -webkit-backdrop-filter: var(--backdrop-blur-sm);
    color: var(--text-color);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    background: var(--bg-secondary);
}

.input-unit {
    position: absolute;
    right: 1rem;
    color: var(--text-white);
    opacity: 0.6;
    font-size: 0.875rem;
    pointer-events: none;
}

.form-input:not(:placeholder-shown)+.input-unit {
    opacity: 0.8;
}

.convert-section {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.convert-note {
    color: var(--text-white);
    opacity: 0.7;
    font-size: 0.875rem;
    margin: 0.75rem 0 0 0;
}

/* Enhanced Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-height: 52px;
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    letter-spacing: 0.025em;
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-active) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

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

/* Preview Section */
.preview-section {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.preview-header {
    margin-bottom: 2rem;
}

.preview-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0 0 0.5rem 0;
}

.preview-icon {
    font-size: 1.5rem;
}

.preview-description {
    color: var(--text-white);
    opacity: 0.8;
    margin: 0;
}

.gif-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.gif-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    max-width: 100%;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.gif-preview img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.preview-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Status Container */
.status-container {
    margin: 2rem 0;
    text-align: center;
}

/* Progress Bar */
.progress-container {
    margin: 1.5rem 0;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-button);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-white);
    opacity: 0.8;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
    backdrop-filter: var(--backdrop-blur-sm);
    -webkit-backdrop-filter: var(--backdrop-blur-sm);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.feature-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--box-shadow-glow);
    border-color: var(--primary-color);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-white);
    opacity: 0.8;
    line-height: 1.6;
}

/* How it Works Section */
.how-it-works-section {
    padding: 4rem 0;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 300px;
    flex: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-button);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow-glow);
    border: 2px solid var(--border-glass);
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.75rem;
}

.step-description {
    color: var(--text-white);
    opacity: 0.8;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-white);
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    color: var(--text-white);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    opacity: 0.6;
    font-size: 0.875rem;
}

/* File Stats */
.file-stats {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-white);
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Quality Slider */
.quality-slider-container {
    margin: 1rem 0;
}

.quality-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-primary);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-button);
    cursor: pointer;
    border: 2px solid var(--text-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-button);
    cursor: pointer;
    border: 2px solid var(--text-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.quality-label {
    font-size: 0.8rem;
    color: var(--text-white);
    opacity: 0.7;
    text-align: center;
}

.quality-label small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
}

.quality-value {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-white);
    opacity: 0.8;
}

/* Conversion Stats */
.conversion-stats {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    display: none;
}

.conversion-stats.show {
    display: block;
    animation: slideInUp 0.5s ease-out;
}

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

.stats-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-align: center;
}

.stats-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    text-align: center;
}

.stat-comparison-item {
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.stat-comparison-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-white);
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.stat-comparison-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--success-color);
}

.stat-comparison-value.reduction {
    color: var(--primary-color);
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.btn:disabled .btn-icon {
    animation: pulse 1.5s infinite;
}

/* PWA Install Button */
.pwa-install-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--z-index-modal);
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    animation: slideInUp 0.5s ease-out;
    max-width: 320px;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    position: relative;
}

.install-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.install-text {
    flex: 1;
}

.install-title {
    font-weight: 600;
    color: var(--text-white);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.install-subtitle {
    font-size: 0.8rem;
    color: var(--text-white);
    opacity: 0.7;
}

.install-btn {
    background: var(--gradient-button);
    color: var(--text-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.install-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-white);
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.install-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Batch Processing Styles */
.batch-section {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--box-shadow);
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.batch-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

.batch-icon {
    font-size: 1.5rem;
}

.batch-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.batch-queue {
    min-height: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 2rem;
}

.queue-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: var(--text-white);
    opacity: 0.6;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    transition: all var(--transition-normal);
}

.queue-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.queue-item-info {
    flex: 1;
    min-width: 0;
}

.queue-item-name {
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-size {
    font-size: 0.875rem;
    color: var(--text-light);
}

.queue-item-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    margin-top: 0.25rem;
    display: inline-block;
}

.status-pending {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

.status-processing {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
}

.status-completed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-failed {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.queue-item-progress {
    width: 100px;
}

.progress-bar-small {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill-small {
    height: 100%;
    background: var(--gradient-button);
    transition: width var(--transition-normal);
}

.queue-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem;
    min-height: auto;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
}

.btn-remove {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-remove:hover {
    background: rgba(220, 53, 69, 0.3);
}

.batch-progress {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
    font-weight: 500;
}

.progress-eta {
    margin-left: auto;
    font-size: 0.875rem;
    opacity: 0.8;
}

.batch-results {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    text-align: center;
}

.results-summary {
    margin-bottom: 2rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    text-align: center;
}

.stat-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.results-list {
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.result-item.success {
    border-left: 4px solid var(--success-color);
}

.result-item.failed {
    border-left: 4px solid var(--error-color);
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.result-status {
    font-size: 0.875rem;
    color: var(--text-light);
}

.result-error {
    font-size: 0.8rem;
    color: var(--error-color);
    margin-top: 0.25rem;
}

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

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Live Preview Styles Removed */

/* Smart Optimizer Styles */
.optimizer-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.optimizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.optimizer-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

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

.analysis-results {
    margin-top: 1.5rem;
}

.analysis-summary-content,
.suggestions-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.analysis-summary-content h4,
.suggestions-content h4 {
    color: var(--text-white);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.analysis-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
}

.metric-label {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.875rem;
}

.metric-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.suggestions-list {
    margin-bottom: 1rem;
}

.suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.suggestion-label {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.875rem;
}

.suggestion-value {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.apply-suggestion-btn {
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.apply-suggestion-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.suggestions-reasoning {
    margin-bottom: 1rem;
}

.suggestions-reasoning h5 {
    color: var(--text-white);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.suggestions-reasoning ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.875rem;
}

.suggestions-reasoning li {
    margin-bottom: 0.25rem;
}

.suggestions-actions {
    text-align: center;
}

.target-size-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
}

.target-size-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.target-size-input label {
    color: var(--text-white);
    font-size: 0.875rem;
    margin: 0;
    white-space: nowrap;
}

.target-size-input input {
    width: 80px;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
}

.target-size-input select {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
}

.size-estimation {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.875rem;
    text-align: center;
}

@media (max-width: 768px) {
    .optimizer-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .analysis-metrics {
        grid-template-columns: 1fr;
    }
    
    .suggestion {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .target-size-input {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Visual Editor Styles */
.editor-controls {
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.editor-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-white);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.editor-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.editor-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

.editor-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 0.5rem;
}

.editor-properties {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.properties-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
}

.properties-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0 0 1rem 0;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.property-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.property-group.full-width {
    grid-column: 1 / -1;
}

.property-group label {
    font-size: 0.875rem;
    color: var(--text-white);
    opacity: 0.8;
    margin: 0;
}

.property-group input,
.property-group select {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
}

.property-group input:focus,
.property-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.property-unit {
    font-size: 0.8rem;
    color: var(--text-white);
    opacity: 0.6;
    margin-top: 0.25rem;
}

.property-value {
    font-size: 0.8rem;
    color: var(--text-white);
    opacity: 0.8;
    margin-top: 0.25rem;
    font-family: monospace;
}

.properties-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.text-overlay {
    border: 2px dashed transparent;
    transition: border-color var(--transition-normal);
}

.text-overlay:hover {
    border-color: var(--primary-color);
}

.text-overlay.selected {
    border-color: var(--accent-color);
    background: rgba(0, 212, 255, 0.1);
}

/* Smart Optimizer Styles */
.optimizer-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.optimizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.optimizer-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

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

.analysis-results {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.analysis-summary-content h4,
.suggestions-content h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.analysis-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.metric-label {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.875rem;
}

.metric-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.suggestions-list {
    margin-bottom: 1rem;
}

.suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.suggestion-label {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.875rem;
}

.suggestion-value {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.apply-suggestion-btn {
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.apply-suggestion-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.suggestions-reasoning {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.suggestions-reasoning h5 {
    color: var(--text-white);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.suggestions-reasoning ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-white);
    opacity: 0.8;
}

.suggestions-reasoning li {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.suggestions-actions {
    text-align: center;
}

.target-size-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.target-size-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.target-size-input label {
    color: var(--text-white);
    font-size: 0.875rem;
    margin: 0;
    white-space: nowrap;
}

.target-size-input input {
    width: 80px;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
}

.target-size-input select {
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
}

.size-estimation {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 0.875rem;
    text-align: center;
}

@media (max-width: 768px) {
    .editor-toolbar {
        justify-content: center;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .properties-actions {
        justify-content: center;
    }
    
    .optimizer-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .analysis-metrics {
        grid-template-columns: 1fr;
    }
    
    .suggestion {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .target-size-input {
        flex-direction: column;
        align-items: stretch;
    }
}

.timeline-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-white);
    font-size: 0.9rem;
    font-family: monospace;
}

.timeline-separator {
    opacity: 0.6;
}

.preview-settings {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.setting-label {
    font-size: 0.875rem;
    color: var(--text-white);
    opacity: 0.8;
    margin: 0;
}

.setting-select {
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
    min-width: 100px;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

@media (max-width: 768px) {
    .preview-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .preview-controls {
        justify-content: center;
    }
    
    .preview-settings {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline-handle {
        width: 20px;
        height: 20px;
    }
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.share-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow-xl);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.share-modal-header h3 {
    color: var(--text-white);
    margin: 0;
    font-size: 1.25rem;
}

.share-modal-close {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.share-modal-body p {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.share-text {
    width: 100%;
    height: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    color: var(--text-color);
    font-family: monospace;
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.share-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.copy-text-btn {
    width: 100%;
}

@media (max-width: 768px) {
    .batch-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-controls {
        justify-content: center;
    }
    
    .queue-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .queue-item-progress {
        width: 100%;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .pwa-install-button {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .install-content {
        padding: 0.75rem;
    }
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

    .nav {
        display: none;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .upload-area,
    .url-input-area {
        padding: 2rem 1rem;
        min-height: 250px;
    }

    .url-input-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .url-load-btn {
        width: 100%;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .option-card {
        padding: 1rem;
    }

    .preview-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {

    .upload-area,
    .url-input-area {
        padding: 1.5rem 1rem;
        min-height: 200px;
    }

    .upload-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-button {
        max-width: none;
    }

    .upload-title {
        font-size: 1.25rem;
    }

    .format-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    .option-card {
        padding: 1rem 0.75rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}/*
 Additional Dark Theme Enhancements */

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Selection styling */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-white);
}

::-moz-selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-white);
}

/* Enhanced button glow effects */
.btn-primary:hover {
    box-shadow: 
        0 12px 40px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-success:hover {
    box-shadow: 
        0 8px 25px rgba(0, 255, 136, 0.4),
        0 0 0 1px rgba(0, 255, 136, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Enhanced card hover effects */
.upload-area:hover {
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.3),
        0 0 0 1px var(--primary-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Subtle text glow for headings */
.hero-title,
.section-title,
.options-title,
.preview-title {
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Enhanced status messages for dark theme */
.status.success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.1);
}

.status.error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 71, 87, 0.3);
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.1);
}

/* Enhanced focus states */
.form-input:focus,
.form-select:focus,
.url-input:focus {
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.3),
        0 4px 20px rgba(139, 92, 246, 0.2);
}

/* Improved glass morphism effect */
.header::before {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 92, 246, 0.1), 
        transparent);
}

/* Enhanced particle animation */
.particles::before,
.particles::after {
    animation: float 25s infinite ease-in-out, 
               pulse 8s infinite ease-in-out alternate;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    100% { opacity: 0.8; }
}

/* Dark theme specific adjustments */
@media (prefers-color-scheme: dark) {
    .upload-icon {
        filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.6));
    }
    
    .feature-icon {
        filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.3));
    }
}

/* Enhanced mobile dark theme */
@media (max-width: 768px) {
    .upload-area,
    .url-input-area {
        background: var(--bg-card);
        border: 1px solid var(--border-glass);
    }
    
    .option-card {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
    }
}/* Smart Opt
imizer Styles */
.optimizer-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--box-shadow);
}

.optimizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.optimizer-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

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

.analysis-results {
    margin-top: 1rem;
}

.analysis-summary {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.analysis-summary h4 {
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.analysis-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.metric-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.metric-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.optimization-suggestions {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.suggestions-content h4 {
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.suggestion-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.suggestion-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.apply-suggestion-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.apply-suggestion-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.suggestions-reasoning {
    margin-bottom: 1rem;
}

.suggestions-reasoning h5 {
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.suggestions-reasoning ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.suggestions-reasoning li {
    margin-bottom: 0.25rem;
}

.suggestions-actions {
    display: flex;
    justify-content: center;
}

.target-size-section {
    background: rgba(255, 165, 2, 0.05);
    border: 1px solid rgba(255, 165, 2, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
}

.target-size-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.target-size-input label {
    color: var(--text-light);
    font-size: 0.875rem;
    white-space: nowrap;
}

.target-size-input input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    width: 80px;
}

.target-size-input select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.size-estimation-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.size-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-estimate {
    color: var(--text-light);
    font-size: 0.875rem;
}

.target-size {
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.size-indicator {
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.size-indicator.over-target {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.size-indicator.under-target {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Responsive Design for Smart Optimizer */
@media (max-width: 768px) {
    .optimizer-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .analysis-metrics {
        grid-template-columns: 1fr;
    }
    
    .suggestion {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .target-size-input {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .size-comparison {
        flex-direction: column;
        gap: 0.25rem;
    }
}/
* Recommendation Engine Styles */
.confidence-indicator {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.confidence-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.confidence-label {
    color: var(--text-light);
    font-size: 0.875rem;
    white-space: nowrap;
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    border-radius: 4px;
    transition: var(--transition-normal);
}

.confidence-fill.high {
    background: linear-gradient(90deg, var(--success-color), #00cc77);
}

.confidence-fill.medium {
    background: linear-gradient(90deg, var(--warning-color), #ff9500);
}

.confidence-fill.low {
    background: linear-gradient(90deg, var(--error-color), #ff3742);
}

.confidence-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
    min-width: 35px;
    text-align: right;
}

.success-message-with-feedback {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
    animation: slideIn 0.3s ease-out;
}

.success-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.success-text {
    color: var(--success-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.feedback-btn {
    background: var(--accent-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.feedback-btn:hover {
    background: #00b8e6;
    transform: translateY(-1px);
}

/* Feedback Modal Styles */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal);
    backdrop-filter: var(--backdrop-blur);
}

.feedback-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow-xl);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.feedback-header h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-feedback {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.close-feedback:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.feedback-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feedback-question {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feedback-question label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.star:hover,
.star.active {
    color: var(--warning-color);
    transform: scale(1.1);
}

.setting-changes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setting-change {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.setting-change label {
    min-width: 60px;
    color: var(--text-light);
    font-size: 0.875rem;
}

.setting-change input,
.setting-change select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    flex: 1;
}

.setting-change input:focus,
.setting-change select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

#feedbackComments {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    color: var(--text-color);
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

#feedbackComments:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.feedback-actions .btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.feedback-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.feedback-actions .btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
}

.feedback-actions .btn-primary:hover {
    background: var(--primary-hover);
}

/* Animation for success message */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Feedback */
@media (max-width: 768px) {
    .feedback-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .success-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .confidence-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .confidence-bar {
        order: 2;
    }
    
    .confidence-value {
        order: 3;
        text-align: center;
    }
    
    .setting-change {
        flex-direction: column;
        align-items: stretch;
    }
    
    .setting-change label {
        min-width: auto;
    }
}/
* File Size Targeting Styles */
.advanced-targeting-controls {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.targeting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.targeting-option label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    cursor: pointer;
}

.targeting-option input[type="checkbox"] {
    accent-color: var(--primary-color);
}

.targeting-option select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.optimization-progress {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-details {
    color: var(--text-light);
    font-size: 0.75rem;
    text-align: center;
}

.quality-warnings {
    background: rgba(255, 165, 2, 0.1);
    border: 1px solid rgba(255, 165, 2, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
    animation: slideIn 0.3s ease-out;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

.warning-title {
    color: var(--warning-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.warning-list {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.warning-list li {
    margin-bottom: 0.25rem;
}

/* Enhanced size estimation display */
.size-estimation-content {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
}

.size-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.current-estimate {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.target-size {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
}

.size-indicator {
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.size-indicator.over-target {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.size-indicator.under-target {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Real-time estimation updates */
.size-estimation-live {
    position: relative;
    overflow: hidden;
}

.size-estimation-live::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Optimization step indicators */
.optimization-step-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    color: var(--primary-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive design for targeting controls */
@media (max-width: 768px) {
    .targeting-options {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .size-comparison {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .quality-warnings {
        padding: 0.75rem;
    }
    
    .warning-list {
        padding-left: 1rem;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .optimization-progress {
        background: rgba(139, 92, 246, 0.08);
        border-color: rgba(139, 92, 246, 0.25);
    }
    
    .quality-warnings {
        background: rgba(255, 165, 2, 0.08);
        border-color: rgba(255, 165, 2, 0.25);
    }
    
    .size-estimation-content {
        background: rgba(255, 255, 255, 0.03);
    }
}/* F
ormat Processor Styles */
.format-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--box-shadow);
}

.format-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.format-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

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

.format-selection {
    margin-bottom: 1.5rem;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.format-option {
    cursor: pointer;
    position: relative;
}

.format-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.format-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    transition: var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.format-option input[type="radio"]:checked + .format-card {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

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

.format-name {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
}

.format-desc {
    color: var(--text-light);
    font-size: 0.875rem;
    flex: 1;
}

.format-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.feature {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.format-advanced {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.advanced-section h4 {
    color: var(--text-color);
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.option-group label {
    color: var(--text-light);
    font-size: 0.875rem;
    min-width: 120px;
}

.option-group select,
.option-group input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    flex: 1;
}

.option-group input[type="range"] {
    padding: 0;
    height: 6px;
    background: var(--border-color);
    outline: none;
    border-radius: 3px;
}

.option-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.option-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.option-group input[type="checkbox"] {
    accent-color: var(--primary-color);
    margin-right: 0.5rem;
}

.format-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.format-recommendation {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
    animation: slideIn 0.3s ease-out;
}

.recommendation-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

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

.recommendation-title {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.875rem;
    flex: 1;
}

.recommendation-confidence {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.recommendation-text {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.4;
}

.recommendation-text strong {
    color: var(--text-color);
}

/* Format validation indicators */
.format-validation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
}

.format-validation.valid {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.format-validation.invalid {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.format-validation.warning {
    background: rgba(255, 165, 2, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 165, 2, 0.3);
}

/* Format processing progress */
.format-progress {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.format-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.format-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.format-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.format-progress-details {
    color: var(--text-light);
    font-size: 0.75rem;
    text-align: center;
}

/* Responsive design for format panel */
@media (max-width: 768px) {
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .format-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .option-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .option-group label {
        min-width: auto;
    }
    
    .recommendation-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .format-card {
        padding: 0.75rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .format-card {
        border-width: 3px;
    }
    
    .format-option input[type="radio"]:checked + .format-card {
        border-width: 4px;
    }
    
    .feature {
        border: 1px solid var(--primary-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .format-card {
        transition: none;
    }
    
    .format-card:hover {
        transform: none;
    }
    
    .format-recommendation {
        animation: none;
    }
}/* Anim
ation Controls Styles */
.animation-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: var(--backdrop-blur);
    box-shadow: var(--box-shadow);
}

.animation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.animation-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

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

.animation-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-section h4 {
    color: var(--text-color);
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Direction Controls */
.direction-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.direction-option {
    cursor: pointer;
    position: relative;
}

.direction-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.direction-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    text-align: center;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.direction-option input[type="radio"]:checked + .direction-card {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

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

.direction-icon {
    font-size: 1.5rem;
}

.direction-name {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Speed Controls */
.speed-control {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.speed-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.speed-preset {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.speed-preset:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.speed-preset.active {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.speed-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.speed-slider-container label {
    color: var(--text-light);
    font-size: 0.875rem;
    white-space: nowrap;
}

#speedSlider {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    border: none;
}

#speedSlider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#speedSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#speedValue {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
    min-width: 40px;
    text-align: right;
}

/* Loop Controls */
.loop-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.loop-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.loop-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.loop-option label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    flex: 1;
}

.loop-option input[type="radio"] {
    accent-color: var(--primary-color);
}

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

#loopCount {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    width: 80px;
}

#loopCount:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Advanced Options */
.advanced-animation-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
    border: 1px solid transparent;
    transition: var(--transition-fast);
    cursor: pointer;
}

.checkbox-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.checkbox-option input[type="checkbox"] {
    accent-color: var(--primary-color);
    margin-right: 0.5rem;
}

.checkbox-label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.checkbox-desc {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-left: 1.5rem;
    line-height: 1.3;
}

/* Animation Preview */
.animation-preview {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1.5rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h4 {
    color: var(--text-color);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.preview-controls {
    display: flex;
    gap: 0.5rem;
}

.preview-controls .btn-small {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.preview-controls .btn-small:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.preview-canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#animationPreviewCanvas {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: #000;
    max-width: 100%;
    height: auto;
}

.preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    color: var(--text-light);
    font-size: 0.75rem;
    gap: 1rem;
}

.preview-info span {
    flex: 1;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .direction-controls {
        grid-template-columns: 1fr;
    }
    
    .speed-presets {
        justify-content: center;
    }
    
    .speed-slider-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .loop-option {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .preview-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .preview-info span {
        text-align: center;
    }
    
    .animation-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

/* Animation effects */
@keyframes speedChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.speed-preset.active {
    animation: speedChange 0.3s ease-out;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .direction-card,
    .speed-preset,
    .loop-option,
    .checkbox-option {
        border-width: 2px;
    }
    
    .direction-option input[type="radio"]:checked + .direction-card {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .direction-card,
    .speed-preset,
    .loop-option,
    .checkbox-option {
        transition: none;
    }
    
    .direction-card:hover {
        transform: none;
    }
    
    .speed-preset.active {
        animation: none;
    }
}/* Social 
Sharing Styles */
.sharing-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal);
    backdrop-filter: var(--backdrop-blur);
    padding: 2rem;
}

.sharing-panel .sharing-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow-xl);
    position: relative;
}

.sharing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sharing-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.sharing-icon {
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.sharing-platforms {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.platform-section h4 {
    color: var(--text-color);
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.platform-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.platform-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.platform-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.platform-btn.active {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.platform-btn.success {
    border-color: var(--success-color);
    background: rgba(0, 255, 136, 0.1);
}

.platform-btn.error {
    border-color: var(--error-color);
    background: rgba(255, 71, 87, 0.1);
}

.platform-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.platform-icon {
    font-size: 1.5rem;
}

.platform-name {
    font-weight: 500;
}

/* Platform-specific button colors */
.discord-btn:hover {
    border-color: #5865f2;
}

.imgur-btn:hover {
    border-color: #1bb76e;
}

.clipboard-btn:hover {
    border-color: var(--accent-color);
}

.qr-btn:hover {
    border-color: var(--warning-color);
}

.embed-btn:hover {
    border-color: #ff6b6b;
}

.download-btn:hover {
    border-color: var(--success-color);
}

/* Sharing Options */
.sharing-options {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.sharing-options h4 {
    color: var(--text-color);
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.option-group input,
.option-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    color: var(--text-color);
    font-size: 0.875rem;
    resize: vertical;
}

.option-group input:focus,
.option-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.webhook-input {
    font-family: monospace;
    font-size: 0.8rem;
}

.webhook-help {
    margin-top: 0.5rem;
}

.webhook-help a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
}

.webhook-help a:hover {
    text-decoration: underline;
}

.share-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Progress */
.sharing-progress {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Results */
.sharing-result {
    margin-top: 1.5rem;
}

.success-result,
.error-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.success-result {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.error-result {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.result-icon {
    font-size: 2rem;
}

.result-message {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.result-url {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
}

.result-url input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: monospace;
}

.copy-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.copy-btn.success {
    background: var(--success-color);
}

/* QR Code */
.qr-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

#qrCanvas {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
}

.qr-actions {
    display: flex;
    justify-content: center;
}

/* Embed Code */
.embed-types {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.embed-type {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.embed-type label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.embed-type textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: monospace;
    resize: none;
}

.embed-type .copy-btn {
    align-self: flex-start;
}

/* Clipboard Fallback */
.clipboard-fallback {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
}

.clipboard-fallback textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: monospace;
    resize: none;
}

/* Webhook Help */
.webhook-help-content {
    color: var(--text-color);
    line-height: 1.6;
}

.webhook-help-content h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.webhook-help-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.webhook-help-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.webhook-help-content p {
    margin: 1rem 0;
    color: var(--warning-color);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sharing-panel {
        padding: 1rem;
    }
    
    .sharing-content {
        padding: 1.5rem;
        max-height: 90vh;
    }
    
    .platform-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .platform-btn {
        padding: 0.75rem;
    }
    
    .result-url {
        flex-direction: column;
    }
    
    .embed-type .copy-btn {
        align-self: stretch;
    }
    
    .sharing-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Animation for sharing panel */
@keyframes shareModalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sharing-panel .sharing-content {
    animation: shareModalIn 0.3s ease-out;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .platform-btn {
        border-width: 3px;
    }
    
    .platform-btn.active {
        border-width: 4px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .platform-btn {
        transition: none;
    }
    
    .platform-btn:hover {
        transform: none;
    }
    
    .sharing-panel .sharing-content {
        animation: none;
    }
}