/* Avatar Studio - Meshy-Style Interface */

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

html, body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

/* Three-Column Layout */
.studio-container {
    display: flex;
    height: calc(100vh - 32px);
    width: calc(100vw - 32px);
    margin: 16px;
    position: relative;
    z-index: 1;
    border-radius: 12px;
    overflow: hidden;
}

/* LEFT SIDEBAR */
.left-sidebar {
    width: 320px;
    background: #1a1a1a;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #1a1a1a;
}

.left-sidebar::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.payment-status {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 6px;
}

.status-text {
    font-size: 13px;
    color: #ff6b35;
    font-weight: 500;
}

/* Payment Gate */
.payment-gate {
    padding: 24px 20px;
}

.gate-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gate-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.price-display {
    font-size: 48px;
    font-weight: 700;
    color: #ff6b35;
    margin: 8px 0;
}

.gate-content > p {
    font-size: 15px;
    line-height: 1.6;
    color: #b0b0b0;
    margin: 0;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.feature-list li {
    padding: 10px 0;
    font-size: 14px;
    color: #d0d0d0;
    border-bottom: 1px solid #2a2a2a;
}

.feature-list li:last-child {
    border-bottom: none;
}

.payment-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.payment-btn:active {
    transform: translateY(0);
}

/* Workflow Tabs */
.workflow-tabs {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
    border-bottom: 1px solid #2a2a2a;
}

/* Order Management */
.order-management {
    padding: 12px;
    border-bottom: 1px solid #2a2a2a;
}

.new-order-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 8px;
    color: #0a0a0a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.new-order-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.current-order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 107, 53, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 6px;
}

.order-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-id {
    font-size: 13px;
    color: #ff6b35;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

/* Order History */
.order-history-toggle {
    border-bottom: 1px solid #2a2a2a;
}

.history-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #a0a0a0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.history-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.history-toggle-btn .chevron {
    margin-left: auto;
    transition: transform 0.2s;
}

.history-toggle-btn.active .chevron {
    transform: rotate(180deg);
}

.order-history-list {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
}

.order-list-header {
    padding: 10px 16px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a2a;
}

.order-list-items {
    padding: 8px;
}

.order-list-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.order-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: #3a3a3a;
}

.order-item.active {
    background: rgba(255, 107, 53, 0.1);
    border-color: #ff6b35;
}

.order-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

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

.order-item-id {
    font-size: 12px;
    color: #ff6b35;
    font-family: 'Courier New', monospace;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-item-status {
    font-size: 11px;
    color: #888;
}

.order-item-date {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
}

.order-status-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.order-status-badge.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.order-status-badge.generating {
    background: rgba(94, 129, 244, 0.15);
    color: #5e81f4;
}

.order-status-badge.complete {
    background: rgba(126, 217, 87, 0.15);
    color: #7ed957;
}

.order-status-badge.failed {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}

/* Saved Concept Section */
.saved-concept-section {
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.saved-concept-section .section-header {
    margin-bottom: 16px;
}

.saved-concept-section .section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.saved-concept-section .section-header p {
    font-size: 13px;
    color: #888;
}

.saved-concept-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0a;
    border: 2px solid #2a2a2a;
    margin-bottom: 12px;
}

.saved-concept-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.concept-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.concept-overlay span {
    font-size: 12px;
    font-weight: 500;
    color: #7ed957;
    display: flex;
    align-items: center;
    gap: 4px;
}

.change-concept-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    color: #ff6b35;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.change-concept-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.5);
    transform: translateY(-1px);
}

.attempts-info {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid #2a2a2a;
}

.attempt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.attempt-row:not(:last-child) {
    border-bottom: 1px solid #2a2a2a;
}

.attempt-row span:first-child {
    color: #a0a0a0;
}

.attempt-count {
    color: #ff6b35;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Upload Concept Section */
.upload-concept-section {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.tab-btn:hover {
    background: #252525;
    color: #ffffff;
}

.tab-btn.active {
    background: #ff6b35;
    color: #0a0a0a;
}

.tab-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

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

/* Approval Status Banner */
.approval-status {
    margin-bottom: 20px;
}

.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.status-banner.pending {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.status-banner.approved {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: #ff6b35;
}

.status-banner svg {
    flex-shrink: 0;
}

.cancel-submission-btn {
    padding: 8px 16px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 6px;
    color: #ff3b30;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cancel-submission-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.5);
}

/* Submit for Approval Button */
.submit-approval-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 8px;
    color: #0a0a0a;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

.submit-approval-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.submit-approval-btn:active {
    transform: translateY(0);
}

/* Step Header */
.step-header {
    margin-bottom: 20px;
}

.step-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.step-header p {
    font-size: 14px;
    color: #a0a0a0;
    line-height: 1.5;
}

.tab-info {
    padding: 16px;
    background: #252525;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tab-info p {
    font-size: 13px;
    color: #a0a0a0;
    line-height: 1.5;
}

/* Input Method Selector */
.input-method-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: #252525;
    border-radius: 8px;
}

.method-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #a0a0a0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.method-btn:hover {
    background: #2a2a2a;
}

.method-btn.active {
    background: #0a0a0a;
    color: #ffffff;
}

/* Upload Area */
.upload-area {
    margin-bottom: 20px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #252525;
    border: 2px dashed #3a3a3a;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-placeholder:hover {
    border-color: #ff6b35;
    background: #2a2a2a;
}

.upload-placeholder p {
    font-size: 14px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 12px;
    color: #707070 !important;
}

.uploaded-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #252525;
    border: 2px solid #ff6b35;
}

.uploaded-preview img {
    width: 100%;
    display: block;
    border-radius: 10px;
}

.re-upload-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.re-upload-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: #ff6b35;
}

/* Generation Info */
.generation-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #252525;
    border-radius: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.info-row span:first-child {
    color: #a0a0a0;
}

.tries-remaining {
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.tries-count {
    color: #ff6b35;
    font-weight: 600;
}

.model-select {
    padding: 6px 10px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #3a3a3a;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #ff6b35;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Generation Time */
.generation-time {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #252525;
    border-radius: 6px;
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 16px;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: #ff6b35;
    border: none;
    border-radius: 8px;
    color: #0a0a0a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.generate-btn:hover:not(:disabled) {
    background: #8fe467;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.generate-btn:disabled {
    background: #2a2a2a;
    color: #606060;
    cursor: not-allowed;
}

/* Prompt Input */
.prompt-input {
    width: 100%;
    padding: 12px;
    background: #252525;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
}

.prompt-input:focus {
    outline: none;
    border-color: #ff6b35;
}

/* Remesh Options */
.remesh-options,
.texture-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #252525;
    border-radius: 8px;
}

.option-row span {
    font-size: 13px;
    color: #a0a0a0;
}

.quad-input {
    padding: 6px 10px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    width: 100px;
    text-align: right;
}

.texture-res-select {
    padding: 6px 10px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
}

.texture-maps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.texture-maps label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #e0e0e0;
}

.texture-maps input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* CENTER VIEWPORT */
.center-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0f0f0f;
}

.viewport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.viewport-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    padding: 8px;
    background: #252525;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #2a2a2a;
    border-color: #ff6b35;
    color: #ff6b35;
}

.control-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.viewport-info {
    font-size: 13px;
    color: #a0a0a0;
}

.viewport-info strong {
    color: #ffffff;
}

.model-viewer-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #2a2a2a 0%, #0f0f0f 70%, #000000 100%);
}

/* Approval Confirmation Modal */
.approval-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.approval-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.approval-modal-content {
    text-align: center;
}

.approval-modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.approval-modal-content h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 600;
}

.approval-warning {
    color: #b0b0b0;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.approval-limit-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffc107;
    font-size: 14px;
}

.approval-limit-notice svg {
    flex-shrink: 0;
    stroke-width: 2;
}

.approval-limit-notice strong {
    font-weight: 700;
    color: #ffeb3b;
}

.approval-detail {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.approval-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.approval-cancel-btn,
.approval-confirm-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 140px;
}

.approval-cancel-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.approval-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.approval-confirm-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.approval-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

/* Model Approval Overlay - Bottom Left Corner */
.model-approval-overlay {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    animation: slideIn 0.3s ease-out;
    min-width: 280px;
}

.approval-overlay-header {
    padding: 8px 12px;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    text-align: center;
    backdrop-filter: blur(8px);
}

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

.overlay-approve-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.overlay-approve-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.overlay-action-btn {
    padding: 12px 16px;
    background: rgba(26, 26, 26, 0.95);
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.overlay-action-btn:hover {
    background: rgba(42, 42, 42, 0.95);
    border-color: #4a4a4a;
    transform: translateY(-2px);
}

.overlay-secondary-btn {
    padding: 10px 16px;
    background: rgba(255, 107, 53, 0.15);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.4);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.overlay-secondary-btn:hover {
    background: rgba(255, 107, 53, 0.25);
    border-color: rgba(255, 107, 53, 0.6);
    transform: translateY(-2px);
}

.overlay-action-btn span,
.overlay-secondary-btn span {
    color: #888;
    font-size: 12px;
}

.empty-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #3a3a3a;
}

/* Generation Progress */
.generation-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.progress-circle {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bar {
    transition: stroke-dashoffset 0.3s ease;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
}

.progress-text {
    position: absolute;
    text-align: center;
}

.progress-percent {
    font-size: 48px;
    font-weight: 700;
    color: #ff6b35;
    line-height: 1;
}

.progress-status {
    font-size: 14px;
    color: #a0a0a0;
    margin-top: 8px;
}

model-viewer {
    width: 100%;
    height: 100%;
    background: transparent;
}

.viewport-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #252525;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #2a2a2a;
    border-color: #ff6b35;
    color: #ff6b35;
}

/* RIGHT SIDEBAR */
.right-sidebar {
    width: 340px;
    background: #1a1a1a;
    border-left: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #1a1a1a;
}

.right-sidebar::-webkit-scrollbar {
    width: 8px;
}

.right-sidebar::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.right-sidebar::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

.right-sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.new-avatar-btn {
    padding: 8px;
    background: #ff6b35;
    border: none;
    border-radius: 6px;
    color: #0a0a0a;
    cursor: pointer;
    transition: all 0.2s;
}

.new-avatar-btn:hover {
    background: #8fe467;
    transform: scale(1.05);
}

/* Avatar Groups */
.avatar-groups {
    flex: 1;
    padding: 16px;
}

.avatar-group {
    margin-bottom: 24px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.group-header.clickable {
    cursor: pointer;
    user-select: none;
}

.group-header.clickable:hover {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.group-count {
    padding: 2px 8px;
    background: #252525;
    border-radius: 10px;
    font-size: 11px;
}

/* Avatar List */
.avatar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.avatar-list.collapsed {
    display: none;
}

.avatar-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #252525;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.avatar-item:hover {
    background: #2a2a2a;
    border-color: #ff6b35;
}

.avatar-item:hover .avatar-delete-btn {
    opacity: 1;
}

.avatar-item.active {
    border-color: #ff6b35;
    background: #2a2a2a;
}

.avatar-item.selected {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    box-shadow: 0 0 0 1px #ff6b35;
}

.avatar-delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    padding: 0;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    z-index: 10;
}

.avatar-delete-btn:hover {
    color: #ff4444;
}

.avatar-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: #1a1a1a;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-thumb.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a3a3a;
    font-size: 24px;
}

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

.avatar-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-status {
    font-size: 11px;
    color: #a0a0a0;
    margin-bottom: 6px;
}

.avatar-progress-percent {
    font-size: 13px;
    font-weight: 600;
    color: #ff6b35;
    margin-bottom: 6px;
}

.avatar-progress {
    display: flex;
    gap: 4px;
}

.avatar-progress-bar {
    width: 100%;
    height: 4px;
    background: #3a3a3a;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.avatar-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-step {
    flex: 1;
    height: 3px;
    background: #3a3a3a;
    border-radius: 2px;
}

.progress-step.complete {
    background: #ff6b35;
}

.progress-step.active {
    background: linear-gradient(90deg, #ff6b35 50%, #3a3a3a 50%);
}

/* Texture Tab Styling */
.texture-info {
    background: #252525;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.texture-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.texture-info .tries-count {
    font-size: 1.1rem;
    color: #ff6b35;
    font-weight: 600;
}

/* Finalize Tab Styling */
.finalize-checklist {
    background: #252525;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #333;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item svg {
    width: 24px;
    height: 24px;
    color: #ff6b35;
    stroke-width: 2;
}

.checklist-item span {
    font-size: 1rem;
    color: #fff;
}

.finalize-info {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.finalize-info p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.ship-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.ship-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.ship-btn:active {
    transform: translateY(0);
}

.ship-btn svg {
    filter: brightness(0);
}

/* Approval Actions */
.approval-actions {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.approval-prompt {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ff6b35;
    text-align: center;
}

.approve-btn,
.regenerate-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.approve-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
}

.approve-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.regenerate-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.regenerate-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.regenerate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1200px) {
    .left-sidebar,
    .right-sidebar {
        width: 280px;
    }
}

@media (max-width: 968px) {
    .right-sidebar {
        display: none;
    }
}
