/* =========================================
   GLOBAL BASE
========================================= */
body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 10px;
}

button {
    padding: 8px 12px;
    border: none;
    background: #333;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #555;
}

/* =========================================
   HEADER
========================================= */
.hero-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, #1A6F75, #06201A);
    color: white;
    border-bottom: 3px solid #03100E;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 50px;
    font-weight: 900;
    margin: 0;
    letter-spacing: 2px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hero-auth {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 150px;
}

/* Auth buttons */
.auth-btn {
    padding: 8px 14px;
    border: none;
    background: white;
    color: #1A6F75;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, transform 0.15s;
}
.auth-btn:hover {
    background: #207F86;
    transform: scale(1.05);
}

.hero-logo {
    width: 120px;       /* adjust as needed */
    height: auto;
    display: block;
    margin: 0 auto;     /* centers it horizontally */
}

/* =========================================
   SEARCH + FILTER BAR
========================================= */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

input[type="text"],
select {
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #aaa;
}

/* =========================================
   GRID + ROWS
========================================= */
.grid {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Universal column styling */
.col {
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive row layout */
.row-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    margin-bottom: 10px;
}

.row-header {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr 1.5fr;
    gap: 12px;
    padding: 14px 16px;
    background: #333;
    color: #fff;
    font-weight: bold;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* =========================================
   SORTING
========================================= */
.sortable {
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sortable:hover {
    background: #3a3a3a;
    color: #fff;
}

.active-sort {
    background: #444 !important;
    color: #fff !important;
}

.sort-arrow {
    display: inline-block;
    margin-left: 6px;
    opacity: 0.6;
    font-size: 0.8em;
}

/* =========================================
   BADGES + ICONS
========================================= */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin: 2px;
    color: white;
}

.badge.tag {
    background: #ddd;
    color: #333;
    padding: 8px 12px;
    font-size: 16px;
}

.box-badge {
    background-color: #e8f0ff;
    color: #1a3a8c;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.faction-icon {
    width: 40px;
    height: 40px;
    margin-right: 4px;
}

/* =========================================
   ACTION BUTTONS
========================================= */
.view-btn {
    padding: 6px 10px;
    background: #2e7d32;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}
.view-btn:hover {
    background: #1b5e20;
}

.own-btn.owned {
    background: #2e7d32;
}

/* Action column layout */
.action-col {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================
   RESULTS COUNTER
========================================= */
.results-count {
    font-weight: 600;
    margin: 10px 0;
    padding: 6px 12px;
    background: #eee;
    border-radius: 6px;
    display: block;
    margin-left: auto;
    text-align: right;
}

/* ============================
   MOBILE HEADER FIXES
   ============================ */
@media (max-width: 600px) {

    /* Collapse header grid into a single column */
    .hero-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: space-between;
        padding: 20px 10px;
        gap: 12px;
    }

    /* Reduce giant title size */
    .hero-title {
        font-size: 32px;
        margin-bottom: 10px;
        justify-content: center; /* keeps it centered nicely */

    }

    .hero-logo {
        max-width: 80px;   /* or 70px, 60px — whatever feels right */
        height: auto;
    }

    /* Center the main title */
    .hero-header h1 {
        font-size: 24px;
        margin: 0;
    }

    /* Make the button row wrap cleanly */
    .hero-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;

        margin-top: 10px;
        width: 100%;
    }

    /* Shrink buttons slightly for mobile */
    .hero-buttons button {
        padding: 6px 10px;
        font-size: 14px;
    }

    /* Auth buttons stack nicely */
    .hero-auth {
        display: flex;
        align-items:center;
        justify-content: center;
        width: 100%;
        gap: 10px;
        flex: 0 0 auto;     
        min-width: 150px;  
    }

    .auth-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .controls {
        flex-direction: column;   /* stack vertically */
        align-items: stretch;     /* full width */
        gap: 12px;                /* nice spacing */
        padding: 0 20px;          /* prevent edge touching */
    }

    .controls input,
    .controls select {
        width: 100%;              /* full width fields */
        font-size: 18px;          /* easier tapping */
        padding: 12px;            /* consistent with login page */
    }
}
}


