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

:root {
    --bg-dark: #0d0d1a;
    --bg-card: #1a1a2e;
    --cyan: #00d4ff;
    --magenta: #ff00ff;
    --lime: #39ff14;
    --text: #e0e0e0;
    --text-dim: #888;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-card) 50%, #16213e 100%);
    min-height: 100vh;
    color: var(--text);
}

#webamp-mount {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

/* Ensure Webamp windows are visible and interactive */
#webamp-mount > div {
    position: relative !important;
}

/* Style for draggable Webamp windows */
#webamp {
    z-index: 100;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

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

.title {
    font-family: 'VT323', monospace;
    font-size: clamp(1.8rem, 5vw, 3rem);
    background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--lime));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px var(--cyan)); }
    to { filter: drop-shadow(0 0 20px var(--magenta)); }
}

.subtitle {
    color: var(--text-dim);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Equalizer Bars */
.equalizer-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 24px;
}

.equalizer-bars .bar {
    width: 4px;
    background: linear-gradient(to top, var(--lime), var(--cyan));
    animation: eq-bounce 0.5s ease-in-out infinite;
    border-radius: 2px;
}

.equalizer-bars .bar:nth-child(1) { height: 60%; }
.equalizer-bars .bar:nth-child(2) { height: 100%; }
.equalizer-bars .bar:nth-child(3) { height: 40%; }
.equalizer-bars .bar:nth-child(4) { height: 80%; }
.equalizer-bars .bar:nth-child(5) { height: 50%; }

@keyframes eq-bounce {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 900px) {
    .main-layout {
        grid-template-columns: 320px 1fr;
    }
}

/* Panels */
.webamp-panel, .generation-panel {
    background: rgba(26, 26, 46, 0.9);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 212, 255, 0.15);
    backdrop-filter: blur(10px);
}

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

.panel-header h2 {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--cyan);
}

.current-skin {
    font-size: 0.75rem;
    color: var(--text-dim);
    background: rgba(0, 212, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Webamp Status */
.webamp-status {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    text-align: center;
}

.webamp-ready, .webamp-error {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.webamp-ready p:first-child {
    color: var(--lime);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Base skin status */
.base-skin-status {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
    text-align: center;
}

.status-loading { color: var(--cyan); }
.status-ready { color: var(--lime); }
.status-fallback { color: #ffaa00; }

/* Audio Section */
.audio-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 212, 255, 0.15);
}

.audio-section h3 {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    color: var(--lime);
    margin-bottom: 0.75rem;
}

.url-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.url-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.url-input::placeholder {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.url-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add-url {
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--lime), var(--cyan));
    border: none;
    border-radius: 8px;
    color: var(--bg-dark);
    font-family: 'VT323', monospace;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-add-url:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(57, 255, 20, 0.3);
}

.btn-add-url:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.file-upload-wrapper {
    margin-bottom: 0.5rem;
}

.btn-file-upload {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255, 0, 255, 0.15);
    border: 1px dashed rgba(255, 0, 255, 0.4);
    border-radius: 8px;
    color: var(--magenta);
    font-family: 'VT323', monospace;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-file-upload:hover {
    background: rgba(255, 0, 255, 0.25);
    border-color: var(--magenta);
}

.audio-hint {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-align: center;
    opacity: 0.7;
}

.method-badge {
    display: inline-block;
    font-size: 0.6rem;
    background: rgba(255, 0, 255, 0.2);
    color: var(--magenta);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-left: 0.25rem;
}

.webamp-error p:first-child {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.hint, .error-hint {
    font-size: 0.8rem;
    opacity: 0.7;
}

.loading-webamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-dim);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-card);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-reset {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-dim);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
    width: 100%;
}

.btn-reset:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* Generation Panel Sections */
.upload-section, .prompt-section, .controls-section, .gallery-section {
    margin-bottom: 1.5rem;
}

h3 {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: var(--magenta);
    margin-bottom: 0.75rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed rgba(0, 212, 255, 0.4);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 212, 255, 0.05);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover, .drop-zone.dragging {
    border-color: var(--cyan);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.drop-zone.has-image {
    padding: 0.5rem;
}

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

.upload-icon {
    font-size: 2rem;
    color: var(--cyan);
}

.formats {
    font-size: 0.75rem;
    color: var(--text-dim);
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.preview-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    accent-color: var(--cyan);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Prompt Section */
.textarea-wrapper {
    position: relative;
}

textarea {
    width: 100%;
    padding: 1rem;
    padding-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

textarea::placeholder {
    color: var(--text-dim);
}

.char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.prompt-chip {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: 20px;
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}

.prompt-chip:hover {
    background: rgba(255, 0, 255, 0.2);
    border-color: var(--magenta);
    transform: translateY(-2px);
}

/* How it works */
.how-it-works {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.how-it-works h3 {
    margin-bottom: 0.75rem;
    color: var(--cyan);
}

.how-it-works ol {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.how-it-works li {
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.how-it-works code {
    background: rgba(0, 212, 255, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
}

.how-it-works li::marker {
    color: var(--magenta);
}

.atlas-info {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--lime);
    background: rgba(57, 255, 20, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* Controls */
.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-row label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    flex: 1;
    min-width: 140px;
}

select, input[type="range"] {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
}

select:focus {
    outline: none;
    border-color: var(--cyan);
}

input[type="range"] {
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    cursor: pointer;
}

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

.btn-generate {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.btn-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-generate.generating {
    background: linear-gradient(135deg, #333, #444);
}

/* Range hint */
.range-hint {
    font-size: 0.75rem;
    color: var(--magenta);
    font-style: italic;
}

/* Progress bar */
.progress-container {
    margin-bottom: 1rem;
}

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

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

.progress-text {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* WSZ Badge */
.wsz-badge {
    display: inline-block;
    font-size: 0.65rem;
    background: rgba(57, 255, 20, 0.2);
    color: var(--lime);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

/* Gallery */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-clear {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-clear:hover {
    background: rgba(255, 0, 0, 0.1);
}

.gallery-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan) var(--bg-dark);
}

.gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.gallery-scroll::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 3px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 3px;
}

.skin-card {
    flex-shrink: 0;
    width: 150px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s;
}

.skin-card:hover {
    border-color: var(--cyan);
    transform: translateY(-4px);
}

.skin-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.skin-thumbnail.skin-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    border: 1px dashed rgba(0, 212, 255, 0.3);
    font-size: 2rem;
    color: var(--text-dim);
}

.skin-prompt {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    word-break: break-word;
}

.skin-time {
    font-size: 0.65rem;
    color: var(--text-dim);
    opacity: 0.6;
}

.skin-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-small {
    flex: 1;
    padding: 0.4rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-apply {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--cyan);
    color: var(--cyan);
}

.btn-apply:hover {
    background: var(--cyan);
    color: var(--bg-dark);
}

.btn-download {
    background: rgba(57, 255, 20, 0.2);
    border: 1px solid var(--lime);
    color: var(--lime);
}

.btn-download:hover {
    background: var(--lime);
    color: var(--bg-dark);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 1000;
    animation: slideUp 0.3s ease;
    backdrop-filter: blur(10px);
    max-width: 90%;
    text-align: center;
}

.toast-success {
    background: rgba(57, 255, 20, 0.2);
    border: 1px solid var(--lime);
    color: var(--lime);
}

.toast-error {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid #ff6464;
    color: #ff6464;
}

.toast-info {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--cyan);
    color: var(--cyan);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    animation: confetti-fall 2s ease-out forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Footer */
.footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    background: rgba(26, 26, 46, 0.9);
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.footer a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--magenta);
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background: rgba(13, 13, 26, 0.98);
    border-left: 2px solid var(--cyan);
    z-index: 1000;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.debug-header h2 {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: var(--cyan);
    margin: 0;
}

.btn-close-debug {
    padding: 0.5rem 1rem;
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid #ff6464;
    color: #ff6464;
    border-radius: 6px;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-close-debug:hover {
    background: rgba(255, 100, 100, 0.4);
}

.debug-content {
    padding: 1rem 1.5rem;
}

.debug-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.15);
}

.debug-section h3 {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    color: var(--lime);
    margin-bottom: 0.5rem;
}

.debug-info {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
}

.debug-placeholder {
    color: var(--text-dim);
    font-style: italic;
    font-size: 0.85rem;
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.debug-image-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.debug-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: repeating-conic-gradient(#1a1a2e 0% 25%, #0d0d1a 0% 50%) 50% / 20px 20px;
}

.btn-debug-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-debug-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.debug-cut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.debug-cut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 255, 0.2);
    transition: all 0.3s;
}

.debug-cut-item:hover {
    border-color: var(--magenta);
    transform: translateY(-2px);
}

.debug-cut-image {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    background: repeating-conic-gradient(#1a1a2e 0% 25%, #0d0d1a 0% 50%) 50% / 10px 10px;
}

.debug-cut-name {
    font-size: 0.7rem;
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    word-break: break-all;
}

.debug-cut-info {
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.btn-debug-download-small {
    padding: 0.25rem 0.5rem;
    background: rgba(57, 255, 20, 0.2);
    border: 1px solid var(--lime);
    color: var(--lime);
    border-radius: 4px;
    font-size: 0.7rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-debug-download-small:hover {
    background: var(--lime);
    color: var(--bg-dark);
}

.debug-wsz-contents {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.debug-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.debug-table th,
.debug-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.debug-table th {
    background: rgba(0, 212, 255, 0.1);
    color: var(--cyan);
    font-weight: 500;
}

.debug-table td {
    color: var(--text-dim);
}

.debug-table tr:hover td {
    background: rgba(0, 212, 255, 0.05);
    color: var(--text);
}

/* Debug Toggle */
.debug-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 0, 255, 0.08);
    border: 1px dashed rgba(255, 0, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: var(--magenta);
}

.debug-toggle:hover {
    background: rgba(255, 0, 255, 0.15);
    border-color: var(--magenta);
}

.debug-toggle input[type="checkbox"] {
    accent-color: var(--magenta);
    width: 18px;
    height: 18px;
}

.debug-hint {
    font-size: 0.7rem;
    color: var(--text-dim);
    width: 100%;
    margin-top: 0.25rem;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .header {
        padding: 1rem;
    }
    
    .main-layout {
        padding: 1rem;
    }
    
    .webamp-panel, .generation-panel {
        padding: 1rem;
    }
    
    .quick-prompts {
        justify-content: center;
    }
    
    .prompt-chip {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    #webamp-mount {
        position: fixed;
        top: 60px;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        max-width: 100vw;
        overflow: visible;
    }
    
    .btn-generate {
        font-size: 1.2rem;
        padding: 0.875rem 1.5rem;
    }
    
    .debug-panel {
        max-width: 100%;
        width: 100%;
    }
    
    .debug-cut-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}