/* ========================================
   ADMIN / GAME EDITOR STYLES
   ======================================== */

/* Forçar espaçamento entre ícones e texto GLOBALMENTE */
.section-card i,
.feature-item i,
.platform-item i,
.toggle-container i,
.btn i {
    margin-right: 8px !important;
}

/* Exceção para ícones que são o único conteúdo */
.btn i:only-child,
.rounded-circle i {
    margin-right: 0 !important;
}

/* Section Cards */
.section-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    /* Uses premium.css var if available, else fallback provided by browser default or cascade */
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Fallback for vars if premium.css is not present */
:root {
    --color-primary-fallback: #2ecc71;
}

/* Form Controls */
.form-control-dark {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s;
}

.form-control-dark:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary, #2ecc71);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
    color: white;
}

.form-control-dark::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Custom Toggle Switch */
.custom-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 50px !important;
    height: 26px !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background .3s;
    outline: none;
    border: none;
    display: inline-block;
    vertical-align: middle;
}

.custom-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform .3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-toggle:checked {
    background: var(--color-primary, #2ecc71);
}

.custom-toggle:checked::after {
    transform: translateX(24px);
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s;
}

.toggle-container:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Image Upload Cards */
.image-upload-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-upload-card:hover {
    border-color: var(--color-primary, #2ecc71);
    background: rgba(46, 204, 113, 0.05);
}

.image-upload-card img {
    max-height: 150px;
    /* Constrain height */
    max-width: 100%;
    /* Constrain width */
    object-fit: contain;
    /* Ensure aspect ratio */
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.image-upload-card input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 20;
    /* High z-index */
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    border-radius: 10px;
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-image-btn:hover {
    background: var(--color-accent, #e74c3c);
}

/* Feature & Platform Lists */
.feature-list,
.platform-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.feature-item,
.platform-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover,
.platform-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(46, 204, 113, 0.3);
}

/* ScreenShots Grid */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.screenshot-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

.screenshot-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.screenshot-card:hover img {
    transform: scale(1.05);
}

.screenshot-actions {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.screenshot-card:hover .screenshot-actions {
    opacity: 1;
}

.upload-zone {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.upload-zone:hover {
    border-color: var(--color-primary, #2ecc71);
    background: rgba(46, 204, 113, 0.05);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 20;
    /* High z-index */
}

/* Espaçamento entre cards de upload de imagem */
.image-upload-card {
    margin-bottom: 1.5rem !important;
}

/* Espaçamento entre cards de features */
.features-list, .feature-list, .d-flex.flex-column.gap-3 {
    gap: 1.25rem !important;
}

/* Espaçamento entre cards de Media & Assets */
.section-card .row.g-3 {
    row-gap: 2rem !important;
    column-gap: 2rem !important;
}

/* Espaçamento entre seções principais */
.section-card + .section-card {
    margin-top: 2.5rem !important;
}

/* Espaço entre cards de screenshots */
.screenshot-card {
    margin-bottom: 1.25rem !important;
}

/* Espaço entre cards de plataformas */
.platform-item {
    margin-bottom: 1.25rem !important;
}

/* Media & Assets: cards sempre 2 colunas em telas médias/grandes */
.media-assets-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}
.media-assets-row > .col-md-6 {
    flex: 0 0 48%;
    max-width: 48%;
    min-width: 320px;
}
@media (max-width: 991px) {
    .media-assets-row > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}