/* ===== Game Styles Admin Page ===== */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Style cards grid */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.style-card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.style-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.style-card .thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #e2e8f0;
    display: block;
}

.style-card .thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
}

.style-card .card-body {
    padding: .75rem 1rem;
}

.style-card .style-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: .25rem;
}

.style-card .style-meta {
    font-size: .8rem;
    color: #64748b;
}

/* Detail view */
.detail-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.detail-header h3 {
    margin: 0;
    font-weight: 700;
}

/* Asset upload grid */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.asset-slot {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: border-color .2s, background .2s;
}

.asset-slot:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.asset-slot.has-file {
    border-style: solid;
    border-color: #a5b4fc;
    background: #eef2ff;
}

.asset-slot .asset-preview {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: .5rem;
}

.asset-slot .asset-label {
    font-weight: 600;
    font-size: .8rem;
    color: #475569;
    margin-bottom: .5rem;
    word-break: break-all;
}

.asset-slot .asset-placeholder {
    color: #94a3b8;
    font-size: .85rem;
    padding: 1rem 0;
}

.asset-slot .asset-placeholder i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: .3rem;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

/* Card */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border-radius: 10px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

/* Prefab tags */
.prefab-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.prefab-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .85rem;
    font-weight: 500;
    color: #4338ca;
}

.prefab-tag .remove-tag {
    cursor: pointer;
    color: #a5b4fc;
    font-size: 1rem;
    line-height: 1;
}

.prefab-tag .remove-tag:hover {
    color: #ef4444;
}

.hidden { display: none !important; }

@media (max-width: 576px) {
    .page-wrapper { padding: 1rem .5rem 2rem; }
    .styles-grid { grid-template-columns: 1fr; }
    .asset-grid { grid-template-columns: 1fr 1fr; }
}
