* { box-sizing: border-box; }

/* ✅ Semantic UI override: full viewport */
html, body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: #f0f2f5;
}

/* ✅ Main container: full width + responsive padding */
.main-container {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem 1.5rem;
    min-height: calc(100vh - 4rem);
}

/* ✅ Responsive padding */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
        min-height: 100vh;
    }
}

/* Keep legacy selectors */
nav {
    background: #333;
    padding: 10px;
    margin-bottom: 20px;
}
nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 15px;
}
h1 { color: #2c3e50; }
table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    margin: 10px 0;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th { background: #2c3e50; color: white; }
.flash {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    background: #d4edda;
    color: #155724;
}
.btn {
    display: inline-block;
    padding: 6px 12px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin: 2px;
}
.btn:hover { background: #0056b3; }
.btn.red { background: #dc3545; }
.btn.red:hover { background: #c82333; }
.btn-cta { background: #27ae60; }
.btn-cta:hover { background: #1e8449; }
.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}
.btn-outline:hover {
    background: #007bff;
    color: #fff;
}
.cancelled { opacity: 0.6; }
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #dc3545;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}
.muted { color: #6c757d; font-style: italic; }
input[type=text], input[type=number], input[type=file] {
    padding: 4px;
    margin: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ✅ Semantic UI full-viewport helpers */
.ui.fluid.container {
    width: 100vw !important;
    max-width: none !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Content area fills remaining viewport */
.ui.main.container {
    min-height: calc(100vh - 4rem);
}

/* Stackable grid responsive fixes */
@media (max-width: 767px) {
    .ui.one.column.doubling.stackable.grid {
        grid-template-columns: 1fr !important;
    }
    /* ✅ Mobile viewport: prevent table/card overflow */
    .ui.celled.table {
        font-size: 0.8rem;
        min-width: 100%;
        width: 100% !important;
        overflow-x: auto;
        display: block;
    }
    .ui.celled.table th, .ui.celled.table td {
        padding: 6px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ui.cards, .ui.card, .ui.fluid.card {
        min-width: 100% !important;
        max-width: 100% !important;
    }
    .ui.fluid.container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    /* Prevent any horizontal scroll on body */
    html, body {
        overflow-x: hidden;
    }
}

/* ✅ Game logo images — uniform small sizing in Juegos Soportados + cards */
.game-logo-img {
    height: 60px !important;
    max-height: 60px !important;
    max-width: 100px !important;
    width: 100px !important;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
}
.game-cell .ui.column {
    padding: 8px 0;
}
@media (max-width: 767px) {
    .game-logo-img {
        max-height: 55px;
        max-width: 120px;
    }
}
