@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

:root {
    --bg: #010005;
    --cyan: #00f2ff;
    --pink: #ff2d9e;
    --yellow: #f0e45a;
    --green: #3eff9e;
    --panel: rgba(0, 242, 255, 0.03);
    --border: rgba(0, 242, 255, 0.25);
    --dim: rgba(0, 242, 255, 0.6);
}

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

body {
    background: var(--bg);
    min-height: 100vh;
    font-family: 'Share Tech Mono', monospace;
    overflow-x: auto;
    position: relative;
    color: #ccf;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 98;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.2) 2px, rgba(0, 0, 0, 0.2) 4px);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 97;
    pointer-events: none;
    background: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
}

/* 顶部导航栏 */
.top-bar {
    position: relative;
    z-index: 20;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.mode-btn {
    background: transparent;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    padding: 8px 28px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.2s;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    text-shadow: 0 0 5px var(--cyan);
}

.mode-btn.active {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--pink);
    color: var(--pink);
    box-shadow: 0 0 15px var(--pink);
    text-shadow: 0 0 8px var(--pink);
}

.root {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 24px;
    padding: 20px 28px;
    max-width: 1600px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.panel-left {
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.panel-right {
    flex: 1;
    min-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 18px 20px;
    position: relative;
    backdrop-filter: blur(2px);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.2);
    border-color: rgba(0, 242, 255, 0.5);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(0, 245, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.card-label {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--dim);
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: bold;
    border-left: 3px solid var(--cyan);
    padding-left: 10px;
}

.drop-zone {
    border: 1.5px dashed var(--cyan);
    background: rgba(0, 20, 30, 0.4);
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.drop-zone.active {
    border-color: var(--pink);
    background: rgba(255, 45, 158, 0.1);
    box-shadow: 0 0 20px rgba(255, 45, 158, 0.3);
}

.drop-icon {
    font-size: 1.8rem;
    color: var(--cyan);
    text-shadow: 0 0 12px var(--cyan);
}

.drop-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    margin-top: 4px;
    color: var(--cyan);
}

.file-info {
    font-size: 0.65rem;
    margin-top: 8px;
    color: var(--dim);
    word-break: break-all;
}

.slider-group {
    margin-bottom: 18px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--cyan);
    letter-spacing: 1px;
    gap: 12px;
}

.numeric-input {
    background: #0a0a1a;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    padding: 4px 8px;
    width: 70px;
    text-align: center;
    border-radius: 0;
    outline: none;
}

input[type="range"] {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--pink));
    border-radius: 3px;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px var(--cyan);
    border: 1px solid var(--cyan);
    cursor: pointer;
}

.slider-value {
    background: #0a0a1a;
    padding: 2px 8px;
    border-left: 2px solid var(--cyan);
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--cyan);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 242, 255, 0.2);
    padding-top: 10px;
    margin-top: 12px;
    font-size: 0.75rem;
}

.neon-btn {
    background: transparent;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    padding: 8px 14px;
    cursor: pointer;
    text-shadow: 0 0 5px var(--cyan);
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
    transition: 0.15s;
    letter-spacing: 2px;
    clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
    width: 100%;
    margin-top: 8px;
}

.neon-btn:hover {
    background: rgba(0, 242, 255, 0.12);
    box-shadow: 0 0 18px var(--cyan);
    border-color: var(--pink);
    color: white;
}

.btn-pixelate {
    background: linear-gradient(95deg, rgba(0, 242, 255, 0.1), rgba(255, 45, 158, 0.1));
    border-color: var(--pink);
    color: var(--pink);
    font-weight: bold;
}

.filter-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.filter-btn {
    flex: 1;
    font-size: 0.7rem;
    padding: 6px 8px;
}

.mix-options {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}

.mix-option {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    padding: 6px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.mix-option.active {
    border-color: var(--pink);
    background: rgba(255, 45, 158, 0.2);
    color: var(--pink);
}

.img-card {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
    padding: 16px;
    backdrop-filter: blur(3px);
}

.img-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid var(--pink);
    padding-left: 12px;
}

.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #00010a;
    border-radius: 2px;
    overflow: auto;
    min-height: 200px;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.preview-canvas {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.pixel-canvas {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.badge {
    font-size: 0.65rem;
    background: rgba(0, 242, 255, 0.15);
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    color: var(--yellow);
}

.mode-panel {
    display: none;
}

.mode-panel.active {
    display: block;
}
