@import url("https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,300,200");

html, body,  span, h1, h2, h3, h4, h5, h6,
p, a, img, header, nav, section {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

h4 {
    font-size: 150px;
}

/* Basic */
body {
    background: #D4D9DD url("images/bg02.jpg");
    color: #474f51;
    font-size: 13.5pt;
    font-family: 'Yanone Kaffeesatz';
    line-height: 1.85em;
    font-weight: 300;
}

/* Container */
.container {
    margin: 0 auto;
    max-width: 100%;
    width: 1200px;
}

/* Header */
#header {
    position: relative;
    background: #3B4346 url("images/bg01.jpg");
    border-bottom: solid 1px #272d30;
    box-shadow: inset 0px -1px 0px 0px #51575a;
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.75);
}

#header > .container {
    position: relative;
    min-height: 155px;
}

#header h1 {
    position: absolute;
    left: 0;
    bottom: 35px;
    font-size: 2.75em;
}

#header h1 a {
    color: #fff;
    text-decoration: none;
}

#header nav {
    position: absolute;
    right: 0;
    bottom: 35px;
    font-weight: 200;
}

#header nav a {
    color: #c6c8c8;
    text-decoration: none;
    font-size: 1.4em;
    margin-left: 60px;
    outline: 0;
}

#header nav a:hover {
    color: #f6f8f8;
}

.subpage #header > .container {
    height: 155px;
}
/* Banner */
#banner {
    border-top: solid 1px #222628;
    box-shadow: inset 0px 1px 0px 0px #3e484a;
    padding: 35px 0 35px 0;
    color: #fff;
}

#banner p {
    font-size: 2em;
    font-weight: 200;
    line-height: 1.25em;
    padding-right: 1em;
    margin: 0 0 1em 0;
}

/* Content */
#content {
    background: #f7f7f7 url("images/bg03.png");
    border-top: solid 1px #fff;
    padding: 45px 0 45px 0;
    text-align: center;
}

#content section {
    background: #fff;
    padding: 40px 30px 45px 30px;
    box-shadow: 2px 2px 2px 1px rgba(128, 128, 128, 0.1);
    margin: 0 0 25px 0;
}

#content h2 {
    font-size: 1.8em;
    color: #373f42;
    margin: 0 0 0.25em 0;
}

#content h3 {
    color: #96a9b5;
    font-size: 1.25em;
    font-style: italic;
}

#content a {
    color: #000;
}

#content a:hover {
    color: #ED391B;
}

#content p {
    white-space: pre-wrap;
}

#content header {
    margin: 0 0 2em 0;
}

/* Copyright */
#copyright {
    border-top: solid 1px #b5bec3;
    box-shadow: inset 0px 1px 0px 0px #e0e4e7;
    text-align: center;
    padding: 45px 0 80px 0;
    color: #6b777d;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

/* Table */
table {
    border-spacing: 1;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    position: relative;
}
table * {
    position: relative;
}
table thead tr {
    height: 60px;
    background: #36304a;
    color: #fff;
}
table tbody tr {
    height: 50px;
}
table tbody tr:last-child {
    border: 0;
}
table td, table th {
    text-align: left;
    padding-left: 10px;
}

table img {
    vertical-align: middle;
    max-width: 140px;
}

tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

tbody tr {
    font-family: OpenSans-Regular;
    font-size: 15px;
    color: #808080;
    line-height: 1.2;
    font-weight: unset;
}

tbody tr:hover {
    color: #555555;
    background-color: #f5f5f5;
    cursor: pointer;
}

/* Form */
.stat-group .form-group label,
.stat-group .form-group input[type="number"],
.identity-grid-4 .form-group label,
.identity-grid-4 .form-group select {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.form-grid-container {
    display: grid;
    gap: 15px;
}

.identity-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Stars for arena score in form */
.star-rating {
    display: inline-block !important;
    direction: rtl !important;
    font-size: 30px !important;
}

.star-rating input {
    display: none !important;
}

.star-rating label {
    font-size: 30px !important;
    color: #ccc !important;
    cursor: pointer !important;
    line-height: 1 !important;
    display: inline-block !important;
    padding: 0 2px !important;
}

.star-rating label:before {
    content: '\2605' !important;
}

.star-rating label.checked-star {
    color: gold !important;
}

.star-rating label.checked-star ~ label {
    color: gold !important;
}

.star-rating label.half-click-zone {
    border-left: 2px solid rgba(255, 255, 0, 0.5) !important;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: gold !important;
}

.star-rating label:hover {
    color: gold !important;
}

.star-rating.half-score-visual label.checked-star:before {
    content: '\2605' !important;
    color: transparent !important;
    background: linear-gradient(to right, gold 50%, #ccc 50%);
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.star-rating label.half-star-hover:before {
     content: '\2605' !important;
     color: transparent !important;
     background: linear-gradient(to right, gold 50%, #ccc 50%);
     -webkit-background-clip: text !important;
     background-clip: text !important;
     -webkit-text-fill-color: transparent !important;
}

/* Simple styling for the filter bar */
.filter-container {
    background: #f4f4f4;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}
.filter-group {
    flex: 1;
    min-width: 150px;
}
.filter-group label {
    display: block;
    font-size: 0.9em;
    margin-bottom: 5px;
    font-weight: bold;
}
.filter-group input, .filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.filter-actions {
    display: flex;
    gap: 10px;
}

/* Clickable Rows */
tr.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

tr.clickable-row:hover {
    background-color: #e8e8e8 !important; /* Slightly darker than standard hover */
}

/* Simple "Bootstraps" (Card Styles) */
.details-container {
   display: flex;
   flex-wrap: wrap;
   gap: 30px;
   justify-content: center;
}
.details-card {
   background: #fff;
   border: 1px solid #ddd;
   border-radius: 8px;
   padding: 20px;
   box-shadow: 0 2px 4px rgba(0,0,0,0.1);
   flex: 1;
   min-width: 300px;
   max-width: 500px;
}
.stat-row {
   display: flex;
   justify-content: space-between;
   padding: 8px 0;
   border-bottom: 1px solid #eee;
}
.stat-row:last-child {
   border-bottom: none;
}
.badge {
   display: inline-block;
   padding: 4px 8px;
   border-radius: 4px;
   color: #fff;
   font-size: 0.9em;
   font-weight: bold;
   margin-right: 5px;
}

.badge-faction { background-color: #444; }

/* Rarity Badges */
.badge-common {
    background-color: #808080; /* Grey */
}
.badge-uncommon {
    background-color: #2e7d32; /* Deep Green */
}
.badge-rare {
    background-color: #1976d2; /* Strong Blue */
}
.badge-epic {
    background-color: #9c27b0; /* Purple */
}
.badge-legendary {
    background-color: #d4af37; /* Gold */
}
.badge-mythical {
    background-color: #d32f2f; /* Red */
}

/* Affinity Badges */
.badge-force {
    background-color: #d32f2f; /* Red */
}
.badge-magic {
    background-color: #0288d1; /* Blue */
}
.badge-spirit {
    background-color: #388e3c; /* Green */
}
.badge-void {
    background-color: #7b1fa2; /* Purple */
}

/* Faction Badges - Edit colors as desired */
.badge-banner_lords { background-color: #1BE357; }
.badge-high_elves { background-color: #1B9AE3; }
.badge-sacred_order { background-color: #000000; }
.badge-ogryn_tribes { background-color: #A32900; }
.badge-lizardmen { background-color: #C3DB00; }
.badge-skinwalkers { background-color: #FF7D3D; }
.badge-orcs { background-color: #FF0A0A; }
.badge-demonspawn { background-color: #9C001A; }
.badge-undead_hordes { background-color: #0E210E; }
.badge-dark_elves { background-color: #4A104A; }
.badge-knights_revenant { background-color: #1A0000; }
.badge-barbarians { background-color: #C74C00; }
.badge-shadowkin { background-color: #595959; }
.badge-sylvan_watchers { background-color: #007804; }
.badge-dwarves { background-color: #918F5C; }
.badge-argonites { background-color: #FFB91C; }

/* --- Champion Rarity Borders --- */
/* Base style for the image to ensure the border sits nicely */
.champion-portrait {
    border-radius: 4px;
}

.champion-portrait:hover {
    transform: scale(1.05); /* Subtle zoom effect on hover */
}

/* Specific Rarity Colors (Border + Glowing Shadow) */
.rarity-border-common {
    border: 4px solid #808080;
    box-shadow: 0 0 15px #808080;
}

.rarity-border-uncommon {
    border: 4px solid #2e7d32;
    box-shadow: 0 0 15px #2e7d32;
}

.rarity-border-rare {
    border: 4px solid #1976d2;
    box-shadow: 0 0 15px #1976d2;
}

.rarity-border-epic {
    border: 4px solid #9c27b0;
    box-shadow: 0 0 15px #9c27b0;
}

.rarity-border-legendary {
    border: 4px solid #d4af37;
    box-shadow: 0 0 15px #d4af37;
}

.rarity-border-mythical {
    border: 4px solid #d32f2f;
    box-shadow: 0 0 15px #d32f2f;
}

/* --- Champion Grid Layout --- */

#champion-grid-container {
    display: grid;
    gap: 15px; /* Slightly larger gap for breathing room */
    width: 100%;

    /* Default: Mobile Phones (1 or 2 columns depending on size) */
    grid-template-columns: repeat(2, 1fr);
    justify-items: center; /* Centers the card in its cell */
}

/* Very small phones (e.g. older iPhones) */
@media (max-width: 400px) {
    #champion-grid-container {
        grid-template-columns: 1fr; /* 1 Column */
    }
}

/* Tablets / Small Windows */
@media (min-width: 600px) {
    #champion-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Laptops / Half-Screen */
@media (min-width: 850px) {
    #champion-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktops */
@media (min-width: 1100px) {
    #champion-grid-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Large Screens (Enforce Max 6) */
@media (min-width: 1350px) {
    #champion-grid-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* --- Champion Card Styling --- */
.champion-card {
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    transition: opacity 0.5s ease-in-out;
    position: relative;
}

.champion-image-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
    transition: transform 0.2s ease;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.champion-image-wrapper:hover {
    transform: scale(1.05);
    z-index: 10;
}

.champion-image-wrapper:hover .affinity-overlay {
    transform: translate3d(-4px, 4px, 0);
}

.affinity-overlay {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 35px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    pointer-events: none;
    transition: transform 0.2s ease;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.affinity-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.champion-name {
    font-weight: bold;
}

.card-hidden {
    opacity: 0;
}

/* --- Back to Top Button --- */
#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position */
    bottom: 20px;
    right: 30px;
    z-index: 99; /* Make sure it's on top */
    border: none;
    outline: none;
    background-color: #333; /* Dark background */
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%; /* Circle shape */
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#backToTopBtn:hover {
    background-color: #555; /* Lighter on hover */
    transform: scale(1.1); /* Slight grow effect */
}

/* --- Data Health Dashboard Styles --- */

.status-ok {
    color: #27ae60; /* Strong Green */
    font-weight: bold;
}

.status-bad {
    color: #c0392b; /* Strong Red */
    font-weight: bold;
}

.sync-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.sync-btn:hover {
    background-color: #2980b9;
}

/* --- Global Loading Overlay --- */
#loading-overlay {
    position: fixed; /* Stays in place when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 9999; /* On top of everything */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(2px); /* Nice blur effect */
}

/* The Spinner Animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid #3498db; /* Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* The Text below the spinner */
#loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    text-shadow: 1px 1px 2px black;
}