/* CSS Variables for Dark Theme with Gold Accent */
:root {
    --primary: #F0B90B;
    --primary-dark: #d4a309;
    --primary-light: #f5c842;
    --background: #000000;
    --surface: #1a1a1a;
    --surface-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border: #333333;
    --border-light: #444444;
    --success: #00d4aa;
    --danger: #ff4757;
    --warning: #ffa502;
    --info: #3742fa;
    --border-radius: 12px;
    --border-radius-small: 8px;
    --box-shadow: 0 4px 20px rgba(240, 185, 11, 0.1);
    --box-shadow-hover: 0 8px 30px rgba(240, 185, 11, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}
a{
    text-decoration: none;
  color: white;
}
body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-icon {
    width: 30px;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.wallet-btn-connected {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    line-height: 1.2;
}

.wallet-btn-connected .btn-icon {
    font-size: 1.2em;
}

.wallet-btn-connected .wallet-address {
    font-size: 0.75em;
    font-weight: 500;
    opacity: 0.9;
}

/* Game Category Buttons */
.game-categories {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 5px 5px 5px;
    margin: 0 -5px;
    position: relative;
}

.game-categories::-webkit-scrollbar {
    display: none;
}



.game-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.game-btn:hover {
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
}

.game-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--background);
}

.game-btn.active:hover {
    background: var(--primary-light);
}

.game-icon {
    font-size: 1.5em;
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
}

.network-indicator {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--background);
    box-shadow: 0 4px 15px rgba(240, 185, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 185, 11, 0.4);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #ff3838;
    transform: translateY(-1px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    background: var(--surface-light) !important;
    color: var(--text-muted) !important;
    border-color: var(--border) !important;
}

.btn:disabled:hover {
    background: var(--surface-light) !important;
    color: var(--text-muted) !important;
    border-color: var(--border) !important;
    transform: none !important;
}

.btn-icon {
    font-size: 1.1em;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Game Banner */
.game-banner {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem;
    color: white;
}

.banner-overlay h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-overlay p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Tabs */
.tab-container {
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-secondary);
}

.tab:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}

.tab-icon {
    font-size: 1.2em;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--box-shadow-hover);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.2);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Marketplace Controls */
.marketplace-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .marketplace-controls {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .search-box {
        flex: 0 0 58%;
        max-width: 58%;
    }
    
    .search-box input {
        font-size: 0.9rem;
        padding: 12px 45px 12px 14px;
    }
    
    .sort-select {
        flex: 0 0 40%;
        max-width: 40%;
        min-width: auto;
        font-size: 0.85rem;
        padding: 12px 35px 12px 12px;
    }
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

@media (max-width: 768px) {
    .search-box {
        max-width: none;
    }
}

.search-box input {
    padding-right: 50px;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2em;
}

.sort-select, .category-filter {
    min-width: 160px;
    max-width: 180px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23F0B90B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.category-filter {
    min-width: 180px;
    max-width: 200px;
}

/* Assets Grid */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.asset-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.asset-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--box-shadow-hover);
}

.asset-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.asset-details {
    padding: 1.5rem;
}

.asset-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.asset-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.asset-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.asset-category {
    margin-bottom: 0.5rem;
}

.asset-category small {
    background: var(--surface-light);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.tax-info {
    font-size: 0.8rem;
    font-weight: 400;
    color: #999999;
    margin-left: 0.5rem;
}

.asset-actions {
    display: flex;
    gap: 12px;
}

.asset-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* Status Messages */
.status-message {
    padding: 16px 20px;
    border-radius: var(--border-radius-small);
    margin-bottom: 1.5rem;
    display: none;
    font-weight: 500;
    border-left: 4px solid;
}

.status-success {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.status-error {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.status-info {
    background: rgba(240, 185, 11, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    min-height: 200px;
}

.spinner {
    border: 4px solid var(--surface);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        text-align: left;
    }
    
    /* Enhanced scroll indicator for mobile */
   
    
    /* Add a subtle shadow to indicate scrollability */
    .game-categories {
        box-shadow: inset -10px 0 10px -10px rgba(240, 185, 11, 0.1);
    }
    
    .game-banner {
        height: 200px;
        margin-bottom: 1.5rem;
    }
    
    .banner-overlay h2 {
        font-size: 1.8rem;
    }
    
    .banner-overlay p {
        font-size: 1rem;
    }
    
    .wallet-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Mobile tab navigation - move to bottom */
    .tab-container {
        position: relative;
        margin-bottom: 0;
    }
    
    .tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--border);
        border-bottom: none;
        margin-bottom: 0;
        padding: 0.5rem 0;
        z-index: 1000;
        justify-content: space-around;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .tab {
        flex-direction: column;
        padding: 8px 12px;
        font-size: 0.75rem;
        gap: 4px;
        border-bottom: none;
        border-top: 3px solid transparent;
        min-width: 0;
        flex: 1;
    }
    
    .tab.active {
        border-top-color: var(--primary);
        border-bottom-color: transparent;
    }
    
    .tab-icon {
        font-size: 1.5em;
    }
    
    /* Add bottom padding to main content to account for fixed tabs */
    main {
        padding-bottom: 100px;
    }
    
    .assets-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .asset-actions {
        flex-direction: column;
    }
    
    .marketplace-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 14px 20px;
    }
    
    .btn-large {
        padding: 16px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .game-btn {
        font-size: 1rem;
        padding: 8px 12px;
        gap: 6px;
    }
    
    .game-icon {
        width: 20px;
        height: 20px;
    }
    
    .tab {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .tab-icon {
        font-size: 1em;
    }
    
    .asset-card {
        margin: 0 -5px;
    }
    
    .asset-image {
        height: 200px;
    }
    
    .card {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .wallet-btn-connected {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .wallet-btn-connected .wallet-address {
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    .header-content {
        gap: 10px;
    }
    
    .game-categories {
        gap: 4px;
    }
    
    .game-btn {
        font-size: 0.6rem;
        padding: 3px 5px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .wallet-info .btn {
        white-space: nowrap;
        min-width: auto;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--background);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Contract Warning Styles */
.contract-warning {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1), rgba(255, 69, 0, 0.1));
    border: 2px solid var(--warning);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    padding: 0;
    overflow: hidden;
}

.warning-content {
    padding: 2rem;
}

.warning-content h3 {
    color: var(--warning);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.warning-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.warning-content ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.warning-content li {
    margin-bottom: 0.5rem;
}

.warning-content code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary);
}

#availableFunctions {
    color: var(--primary);
    font-weight: 600;
}

/* Empty state styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    min-height: 300px;
    grid-column: 1 / -1; /* Span all columns in grid */
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    min-height: 300px;
    grid-column: 1 / -1; /* Span all columns in grid */
}

.error-state h3 {
    color: var(--danger);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-state p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.modal-title {
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface);
    border-top: 1px solid var(--border);
}

/* Asset image cursor pointer */
.asset-image {
    cursor: pointer;
    transition: var(--transition);
}

.asset-image:hover {
    transform: scale(1.05);
}

/* File Upload Styles */
.file-upload-container {
    border: 2px dashed var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    background: var(--background);
}

.file-upload-container:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.file-upload-container input[type="file"] {
    width: 100%;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
}

.file-upload-container input[type="file"]::-webkit-file-upload-button {
    background: var(--primary);
    color: var(--background);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    cursor: pointer;
    margin-right: 1rem;
    transition: var(--transition);
}

.file-upload-container input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.file-upload-info {
    margin-top: 1rem;
}

/* Compression Status */
.compression-status {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border);
}

.compression-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

#compressionText {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

/* Image Preview */
.image-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border);
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--border-radius-small);
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.image-info {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.image-info span {
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

/* Compression ratio styling */
#compressionRatio {
    background: var(--success) !important;
    color: var(--background) !important;
    font-weight: 600;
}

/* Custom Select Dropdown */
.custom-select-wrapper {
    position: relative;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.select-trigger:hover {
    border-color: var(--primary);
}

.select-trigger.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.2);
}

.select-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.select-trigger.active .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-small);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.select-options.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: var(--surface-light);
}

.select-option.selected {
    background: var(--primary);
    color: var(--background);
}

.option-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
    font-size: 16px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #666666;
        --text-secondary: #ffffff;
    }
}