/* GLTF2Sprite - Main Stylesheet */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

.g2s-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.g2s-header {
    background: #16213e;
    padding: 15px 20px;
    border-bottom: 1px solid #0f3460;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.g2s-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #e94560;
}

.g2s-subtitle {
    color: #888;
    font-size: 14px;
}

/* Main Layout */
.g2s-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.g2s-sidebar {
    width: 280px;
    background: #16213e;
    border-right: 1px solid #0f3460;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.g2s-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Panels */
.g2s-panel {
    background: #1f2b47;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #0f3460;
}

.g2s-panel h2 {
    font-size: 14px;
    font-weight: 600;
    color: #e94560;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dropzone */
.g2s-dropzone {
    border: 2px dashed #0f3460;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #16213e;
}

.g2s-dropzone:hover,
.g2s-dropzone-active {
    border-color: #e94560;
    background: #1a2744;
}

.g2s-dropzone-text {
    color: #666;
    font-size: 13px;
}

/* Status */
.g2s-status {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.g2s-status-success {
    color: #4ade80;
}

.g2s-status-error {
    color: #f87171;
}

/* Animation List */
.g2s-anim-list {
    list-style: none;
    margin-top: 10px;
}

.g2s-anim-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #16213e;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 13px;
}

/* Buttons */
.g2s-btn {
    background: #0f3460;
    color: #e0e0e0;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    width: 100%;
}

.g2s-btn:hover {
    background: #1a4a80;
}

.g2s-btn-primary {
    background: #e94560;
}

.g2s-btn-primary:hover {
    background: #ff6b6b;
}

.g2s-btn-small {
    padding: 5px 10px;
    font-size: 12px;
    width: auto;
    background: #0f3460;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.g2s-btn-small:hover {
    background: #1a4a80;
}

.g2s-btn-danger {
    background: #dc2626;
}

.g2s-btn-danger:hover {
    background: #ef4444;
}

/* Form Elements */
.g2s-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.g2s-form-row label {
    font-size: 12px;
    color: #888;
    min-width: 90px;
    flex-shrink: 0;
}

.g2s-form-row input[type="number"],
.g2s-form-row input[type="text"],
.g2s-form-row select {
    flex: 1;
    min-width: 0;
    background: #16213e;
    border: 1px solid #0f3460;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.g2s-form-row input[type="number"]:focus,
.g2s-form-row input[type="text"]:focus,
.g2s-form-row select:focus {
    outline: none;
    border-color: #e94560;
}

.g2s-form-row input[type="range"] {
    flex: 1;
}

.g2s-form-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e94560;
}

/* Settings Grid - horizontal layout for main content area */
.g2s-settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
}

.g2s-settings-grid .g2s-form-row {
    margin-bottom: 0;
}

.g2s-settings-panel {
    padding: 12px 15px;
}

.g2s-settings-panel h2 {
    margin-bottom: 10px;
}

/* Palette */
.g2s-palette-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.g2s-palette-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 60px;
    background: #16213e;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 10px;
}

.g2s-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.1s;
}

.g2s-color-swatch:hover {
    transform: scale(1.2);
    border-color: #e94560;
}

.g2s-palette-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* Sprite Grid */
.g2s-sprite-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.g2s-anim-section h3 {
    font-size: 13px;
    color: #e94560;
    margin-bottom: 8px;
}

.g2s-sprite-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.g2s-sprite-row img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 4px;
}

/* Preview */
.g2s-preview-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

#preview-canvas {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    image-rendering: pixelated;
}

.g2s-preview-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Direction Picker */
.g2s-direction-picker {
    display: grid;
    grid-template-columns: repeat(3, 32px);
    gap: 4px;
}

.g2s-dir-btn {
    width: 32px;
    height: 32px;
    background: #0f3460;
    border: 1px solid #1a4a80;
    color: #888;
    font-size: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.g2s-dir-btn:hover {
    background: #1a4a80;
    color: #e0e0e0;
}

.g2s-dir-btn[data-dir]:active {
    background: #e94560;
}

.g2s-dir-center {
    background: #e94560;
    cursor: default;
}

.g2s-dir-btn.g2s-dir-active {
    background: #e94560;
    color: #fff;
}

/* Vertical Angle Picker */
.g2s-vertical-angle {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.g2s-vertical-angle .g2s-btn-small {
    min-width: 60px;
}

.g2s-vertical-angle .g2s-vangle-active {
    background: #e94560;
    color: #fff;
}

/* Playback */
.g2s-playback {
    display: flex;
    align-items: center;
    gap: 10px;
}

#preview-frame-info {
    font-size: 12px;
    color: #888;
}

/* Export */
.g2s-export-buttons {
    display: flex;
    gap: 10px;
}

.g2s-export-buttons .g2s-btn {
    width: auto;
    flex: 1;
}

/* Preview Row - Side by side layout */
.g2s-preview-row {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.g2s-preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.g2s-3d-preview {
    width: 100%;
    height: 300px;
    background: #16213e;
    border-radius: 6px;
    border: 1px solid #0f3460;
    overflow: hidden;
}

.g2s-3d-preview canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.g2s-sprite-preview-area {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #16213e;
    border-radius: 6px;
    border: 1px solid #0f3460;
}

.g2s-preview-controls-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 15px;
    flex-wrap: wrap;
}

.g2s-anim-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.g2s-anim-controls select {
    background: #16213e;
    border: 1px solid #0f3460;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.g2s-anim-controls select:focus {
    outline: none;
    border-color: #e94560;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #16213e;
}

::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a4a80;
}
