/* =============================================
   ClothingV Store - Complete Stylesheet
   ============================================= */

:root {
    --bg-panel: rgba(10, 14, 24, 0.82);
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(255, 255, 255, 0.06);
    --accent: #4ae68a;
    --accent-hover: #66f0a0;
    --accent-dim: rgba(74, 230, 138, 0.25);
    --accent-border: rgba(74, 230, 138, 0.3);
    --accent-glow: rgba(74, 230, 138, 0.35);
    --accent-gradient: linear-gradient(135deg, #4ae68a, #28a858);
    --accent-btn-gradient: linear-gradient(135deg, #4ae68a, #28a858);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --text: #fff;
    --text-muted: #ffffff;
    --text-dim: #e0e4ec;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: transparent;
    color: var(--text);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.hidden { display: none !important; }

/* =============================================
   Store Container
   ============================================= */
.store-container {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: stretch;
    z-index: 1000;
    animation: storeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-container.closing {
    animation: storeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =============================================
   Store Panel (Left, 3D Tilt)
   ============================================= */
.store-panel {
    width: 390px;
    min-width: 390px;
    margin: 14px;
    border-radius: 20px;
    background: rgba(10, 14, 22, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid var(--accent-border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px 14px;
    gap: 12px;
    transform: perspective(1200px) rotateY(4deg);
    transform-origin: right center;
    box-shadow: 8px 4px 50px rgba(0,0,0,0.6), 0 0 80px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* =============================================
   Title Section
   ============================================= */
.title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 6px;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-fallback {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

.store-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 5px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    line-height: 1.1;
}

.store-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 6px;
    white-space: nowrap;
}

.store-desc {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
    padding-left: 0;
    margin-top: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* =============================================
   Search Bar
   ============================================= */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0 14px;
    height: 36px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    width: 100%;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: var(--text-dim);
}

/* =============================================
   Category Label
   ============================================= */
.category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.cat-label-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.cat-label-icon svg {
    width: 18px;
    height: 18px;
}

.cat-label-text {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.cat-label-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
}

/* =============================================
   Items Area
   ============================================= */
.items-area {
    flex: 1;
    display: flex;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
}

/* Category Sidebar */
.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
    align-items: center;
    width: 42px;
    flex-shrink: 0;
}

.cat-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dim);
    flex-shrink: 0;
}

.cat-btn svg {
    width: 18px;
    height: 18px;
}

.cat-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--border-light);
}

.cat-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent-border);
    color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.sidebar-divider {
    width: 28px;
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
    flex-shrink: 0;
}

.sidebar-extra-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dim);
    flex-shrink: 0;
}

.sidebar-extra-btn svg {
    width: 16px;
    height: 16px;
}

.sidebar-extra-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--border-light);
}

/* Item Grid */
.item-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 4px 4px 0;
    align-content: start;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    animation: cardIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.item-card.selected {
    border-color: var(--accent-border);
    box-shadow: 0 0 12px var(--accent-glow), inset 0 0 0 1px var(--accent-border);
}

.item-thumb {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-thumb-placeholder {
    font-size: 28px;
    color: var(--text-dim);
    font-weight: 300;
    opacity: 0.4;
}

.item-info {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: none;
}

.item-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.item-id {
    font-size: 10px;
    color: #4ade80;
    font-weight: 600;
}

.item-price {
    font-size: 11px;
    color: #4ade80;
    font-weight: 700;
}

/* =============================================
   Selected Item Info
   ============================================= */
.selected-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-radius: 0;
}

.sel-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sel-thumb-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sel-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sel-details {
    flex: 1;
    min-width: 0;
}

.sel-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sel-price {
    font-size: 12px;
    color: #4ade80;
    font-weight: 600;
}

.sel-texture-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.tex-arrow {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.tex-arrow svg {
    width: 14px;
    height: 14px;
}

.tex-arrow:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--border-light);
}

.tex-label {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    min-width: 75px;
    text-align: center;
}

.tex-confirm {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 4px;
}

.tex-confirm svg {
    width: 14px;
    height: 14px;
}

.tex-confirm:hover {
    background: rgba(74, 222, 128, 0.25);
}

/* =============================================
   Buy Buttons
   ============================================= */
.buy-buttons {
    display: flex;
    gap: 8px;
    padding-top: 6px;
}

.btn-reset {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-reset svg {
    width: 20px;
    height: 20px;
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-cash {
    flex: 1;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--accent-btn-gradient);
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-cash:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-card {
    flex: 0.8;
    height: 42px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-card:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
}

/* =============================================
   Mannequin Cart (Fixed Right)
   ============================================= */
.mannequin-cart {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(10, 14, 22, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid var(--accent-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cartIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    padding: 6px;
}

.cart-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
}

.cart-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-dim);
    flex: 1;
}

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

.progress-ring {
    position: absolute;
    inset: 0;
    width: 36px;
    height: 36px;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: var(--border);
}

.progress-ring-fill {
    stroke: var(--accent);
    transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.cart-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.cart-slots {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 8px;
    max-height: 420px;
    overflow-y: auto;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 400' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='1'%3E%3Ccircle cx='50' cy='35' r='18'/%3E%3Cpath d='M50 53 C50 53 50 65 50 65'/%3E%3Cpath d='M30 75 Q50 60 70 75'/%3E%3Cpath d='M25 80 Q50 65 75 80 L80 200 Q50 210 20 200 Z'/%3E%3Cpath d='M20 200 L15 320 Q25 325 35 320 L38 230'/%3E%3Cpath d='M80 200 L85 320 Q75 325 65 320 L62 230'/%3E%3Cpath d='M35 320 L30 380 Q40 385 45 380 L42 330'/%3E%3Cpath d='M65 320 L70 380 Q60 385 55 380 L58 330'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center top 0;
    background-size: 80px auto;
}

.cart-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 8px;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    min-height: 36px;
    transition: var(--transition);
}

.cart-slot:last-child {
    border-bottom: none;
}

.cart-slot.filled {
    border: 1.5px solid var(--accent-border);
    border-radius: var(--radius-md);
    background: rgba(74, 230, 138, 0.06);
    margin: 3px 0;
    padding: 8px 10px;
}

.cart-slot-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.cart-slot.filled .cart-slot-icon {
    color: var(--accent);
}

.cart-slot-icon svg {
    width: 16px;
    height: 16px;
}

.cart-slot-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-slot.filled .cart-slot-label {
    color: #fff;
    font-weight: 600;
}

.cart-slot-var {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
}

.cart-slot-remove {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(239,68,68,0.12);
    border: none;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.cart-slot-remove:hover {
    background: rgba(239,68,68,0.25);
}

.cart-footer {
    padding: 8px 16px 12px;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* =============================================
   Controls Bar (Fixed Bottom Right)
   ============================================= */
.controls-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 0;
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--accent-border);
    border-radius: var(--radius-lg);
    padding: 10px 18px;
    z-index: 50;
}

.ctrl-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ctrl-item:last-child {
    border-right: none;
}

.ctrl-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--accent);
    flex-shrink: 0;
}

.ctrl-esc {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ctrl-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ctrl-key {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
}

.ctrl-desc {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

/* =============================================
   Admin Edit Button & Editor Panel
   ============================================= */
.admin-edit-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-panel);
    border: 1.5px solid var(--accent-border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 100;
    backdrop-filter: blur(16px);
}

.admin-edit-btn svg {
    width: 18px;
    height: 18px;
}

.admin-edit-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.editor-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 280px;
    background: rgba(10, 14, 22, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid var(--accent-border);
    border-radius: 20px;
    padding: 18px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.editor-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.editor-close:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.editor-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.editor-section:last-of-type {
    border-bottom: none;
}

.editor-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-label span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.editor-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.editor-input:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.editor-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.editor-name-row .editor-input {
    flex: 1;
    min-width: 0;
}

.editor-name-sep {
    color: rgba(255, 255, 255, 0.15);
    font-size: 12px;
    flex-shrink: 0;
}

.editor-input-short {
    flex: 0.6 !important;
}

.theme-circles {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.theme-circle:hover {
    transform: scale(1.15);
}

.theme-circle.active {
    border-color: #fff;
    box-shadow: 0 0 12px var(--accent-glow);
}

.editor-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.editor-logo-preview {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.editor-logo-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.editor-logo-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.editor-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
}

.editor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 8px var(--accent-glow);
}

.editor-apply {
    background: var(--accent-btn-gradient);
    border: none;
    border-radius: var(--radius-lg);
    padding: 12px;
    color: #000;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
    margin-top: 10px;
}

.editor-apply:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* =============================================
   Modals (shared)
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal {
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid var(--accent-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    min-width: 380px;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

/* =============================================
   Factions Modal
   ============================================= */
.factions-modal {
    min-width: 440px;
    max-width: 560px;
}

.factions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 50vh;
}

.faction-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.faction-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.faction-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.faction-icon svg {
    width: 22px;
    height: 22px;
}

.faction-name {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.faction-arrow {
    color: var(--text-dim);
    font-size: 18px;
}

.faction-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faction-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    padding: 0;
}

.faction-back svg {
    width: 16px;
    height: 16px;
}

.faction-back:hover {
    color: var(--text);
}

.faction-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
}

.faction-detail-actions {
    display: flex;
    gap: 8px;
}

.btn-faction-equip, .btn-faction-browse {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-faction-equip {
    background: var(--accent-btn-gradient);
    border: none;
    color: #fff;
}

.btn-faction-equip:hover {
    filter: brightness(1.1);
}

.btn-faction-browse {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: var(--text);
}

.btn-faction-browse:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
}

.faction-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

/* =============================================
   Outfits Modal
   ============================================= */
.outfits-modal {
    min-width: 400px;
}

.outfits-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 50vh;
}

.outfit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.outfit-row:hover {
    background: var(--bg-card-hover);
}

.outfit-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}

.outfit-count {
    font-size: 11px;
    color: var(--text-dim);
}

.outfit-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dim);
}

.outfit-btn svg {
    width: 14px;
    height: 14px;
}

.outfit-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.outfit-btn.delete:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.12);
}

.outfit-save-row {
    display: flex;
    gap: 8px;
}

.outfit-save-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.outfit-save-input:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.outfit-save-btn {
    padding: 8px 16px;
    background: var(--accent-btn-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.outfit-save-btn:hover {
    filter: brightness(1.1);
}

/* =============================================
   Share Modal
   ============================================= */
.share-modal {
    min-width: 380px;
}

.share-search {
    position: relative;
}

.share-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.share-search-input:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.share-player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 50vh;
}

.share-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.share-player:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-border);
}

.share-player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

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

.share-player-name {
    font-size: 13px;
    font-weight: 600;
}

.share-player-id {
    font-size: 11px;
    color: var(--text-dim);
}

.share-player-dist {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
}

/* =============================================
   Checkout (Kassenbon / Receipt)
   ============================================= */
.receipt {
    width: 340px;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.receipt-zigzag-top, .receipt-zigzag-bottom {
    height: 14px;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 6px,
        #f5f0e8 6px,
        #f5f0e8 12px
    );
    mask: linear-gradient(135deg, transparent 33.3%, #000 33.3%) 0 0/12px 100%;
    -webkit-mask: linear-gradient(135deg, transparent 33.3%, #000 33.3%) 0 0/12px 100%;
}

.receipt-zigzag-bottom {
    transform: scaleY(-1);
}

.receipt-body {
    background: #f5f0e8;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #2a2520;
    font-family: 'Courier New', Courier, monospace;
}

.receipt-logo-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.receipt-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.receipt-logo-fallback {
    font-size: 24px;
    font-weight: 800;
    color: #2a2520;
    display: flex;
    align-items: center;
    justify-content: center;
}

.receipt-store-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
}

.receipt-line {
    border-bottom: 1px dashed #c4b9a8;
}

.receipt-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b5f52;
}

.receipt-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.receipt-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.receipt-item-price {
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 10px;
}

.receipt-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.receipt-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.receipt-total-row.total {
    font-size: 16px;
    font-weight: 700;
    margin-top: 4px;
}

.receipt-payment {
    font-size: 12px;
    text-align: center;
    color: #6b5f52;
}

.receipt-outfit-save {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.receipt-outfit-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #2a2520;
}

.receipt-outfit-toggle input {
    accent-color: #4ade80;
}

.receipt-outfit-name {
    width: 100%;
    background: rgba(0,0,0,0.05);
    border: 1px solid #c4b9a8;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
    color: #2a2520;
    font-family: inherit;
    outline: none;
}

.receipt-barcode {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

.barcode-lines {
    display: flex;
    gap: 1px;
    height: 40px;
}

.barcode-line {
    width: 2px;
    background: #2a2520;
}

.barcode-line.thin { width: 1px; }
.barcode-line.gap { width: 2px; background: transparent; }

.receipt-thanks {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #2a2520;
}

.receipt-powered {
    text-align: center;
    font-size: 9px;
    color: #9b8e7e;
    letter-spacing: 1px;
}

.receipt-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.receipt-btn-cancel, .receipt-btn-pay {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Segoe UI', sans-serif;
}

.receipt-btn-cancel {
    background: var(--bg-card);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: var(--text);
}

.receipt-btn-cancel:hover {
    background: var(--bg-card-hover);
}

.receipt-btn-pay {
    background: var(--accent-btn-gradient);
    border: none;
    color: #fff;
}

.receipt-btn-pay:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* =============================================
   Leave Confirmation Modal
   ============================================= */
.leave-modal {
    text-align: center;
    align-items: center;
    min-width: 320px;
    max-width: 380px;
}

.leave-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239,68,68,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
}

.leave-icon svg {
    width: 28px;
    height: 28px;
}

.leave-title {
    font-size: 20px;
    font-weight: 700;
}

.leave-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.leave-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.leave-btn-back, .leave-btn-confirm {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.leave-btn-back {
    background: var(--bg-card);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: var(--text);
}

.leave-btn-back:hover {
    background: var(--bg-card-hover);
}

.leave-btn-confirm {
    background: rgba(239,68,68,0.8);
    border: none;
    color: #fff;
}

.leave-btn-confirm:hover {
    background: rgba(239,68,68,0.9);
}

/* =============================================
   Toast Notification
   ============================================= */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--accent-border);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    z-index: 500;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.toast.out {
    animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =============================================
   Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-dim);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-border);
}

/* =============================================
   Animations
   ============================================= */
@keyframes storeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes storeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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