/*
 * Artemis WebUI - Anchor Bootstrap UI Kit Style
 *
 * Design tokens from Anchor UI Kit (wowthemesnet):
 *   Primary:    #502c6c (deep purple)
 *   Primary-hover: #281636
 *   Background: #fff
 *   Body text:  #212529  font-weight: 300
 *   Muted:      #6c757d
 *   Font:       Nunito, sans-serif
 *   Headings:   font-weight: 500
 *   Navbar:     dark with bg-primary, fixed-top
 *   Cards:      white bg, subtle shadow, rounded
 *   Buttons:    rounded pill shape (btn-round)
 */

/* ── Font ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&display=swap');

/* ── Base ───────────────────────────────────────────────────────────── */
body {
    font-family: Nunito, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: #212529;
    background-color: #f8f9fa;
    padding-top: 72px;  /* for fixed navbar */
}

a {
    color: #502c6c;
    text-decoration: none;
}
a:hover {
    color: #281636;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 500;
    color: #212529;
}

/* ── Top Navbar (Anchor style) ──────────────────────────────────────── */
.navbar-main {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.navbar-main .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}
.navbar-main .nav-link {
    font-weight: 400;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* ── Hero / Jumbotron ───────────────────────────────────────────────── */
.jumbotron-hero {
    background: linear-gradient(135deg, #502c6c 0%, #3d1f52 100%);
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}
.jumbotron-hero h1 {
    font-weight: 600;
    color: #fff;
}
.jumbotron-hero .lead {
    font-weight: 300;
    opacity: 0.9;
}

/* ── Container spacing ──────────────────────────────────────────────── */
.main-container {
    padding-bottom: 3rem;
}

/* ── Cards (Anchor style: white, subtle shadow, rounded) ───────────── */
.card {
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
}
.card-body {
    padding: 1.25rem;
}

/* ── Stat Cards ─────────────────────────────────────────────────────── */
.stat-card {
    border: 0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    background: #fff;
    transition: all 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.stat-card-icon.purple { background: rgba(80,44,108,0.1); color: #502c6c; }
.stat-card-icon.teal   { background: rgba(23,162,184,0.1); color: #17a2b8; }
.stat-card-icon.green  { background: rgba(40,167,69,0.1);  color: #28a745; }
.stat-card-icon.orange { background: rgba(253,126,20,0.1); color: #fd7e14; }
.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #212529;
}
.stat-card-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
}

/* ── Tables ─────────────────────────────────────────────────────────── */
.table {
    margin-bottom: 0;
}
.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
}
.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: #f1f3f5;
}
.table tbody tr:hover {
    background: rgba(80,44,108,0.02);
}

/* DataTables overrides for light theme */
.dataTables_wrapper .dt-length select,
.dataTables_wrapper .dt-search input {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}
.dataTables_wrapper .dt-paging .dt-paging-button.current {
    background: #502c6c !important;
    color: #fff !important;
    border-color: #502c6c !important;
}

/* ── Forms ──────────────────────────────────────────────────────────── */
.form-control, .form-select {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 400;
}
.form-control:focus, .form-select:focus {
    border-color: #502c6c;
    box-shadow: 0 0 0 0.2rem rgba(80,44,108,0.15);
}
.form-label {
    color: #495057;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.375rem;
}
.form-text {
    color: #6c757d;
    font-size: 0.8rem;
}

/* ── Buttons (Anchor round style) ───────────────────────────────────── */
.btn {
    border-radius: 2rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.15s ease;
}
.btn-sm {
    padding: 0.3rem 1rem;
    border-radius: 2rem;
}
.btn-primary {
    background-color: #502c6c;
    border-color: #502c6c;
}
.btn-primary:hover {
    background-color: #3d1f52;
    border-color: #3d1f52;
}
.btn-outline-primary {
    color: #502c6c;
    border-color: #502c6c;
}
.btn-outline-primary:hover {
    background-color: #502c6c;
    border-color: #502c6c;
    color: #fff;
}
.btn-outline-secondary {
    color: #6c757d;
    border-color: #dee2e6;
}
.btn-outline-secondary:hover {
    background: #f8f9fa;
    color: #212529;
    border-color: #adb5bd;
}
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}
.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}
.btn-outline-white {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: #fff;
}

/* ── Badges ─────────────────────────────────────────────────────────── */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 2rem;
}

/* ── Breadcrumb ─────────────────────────────────────────────────────── */
.breadcrumb-nav {
    padding: 0.75rem 0;
    margin-bottom: 0;
}
.breadcrumb-item a {
    color: #502c6c;
}
.breadcrumb-item.active {
    color: #6c757d;
}

/* ── Login Page ─────────────────────────────────────────────────────── */
.login-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: -1.5rem;
}
.login-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}
.login-header h2 {
    font-weight: 700;
    color: #502c6c;
    margin-bottom: 0.25rem;
}
.login-header p {
    color: #6c757d;
    margin: 0;
}
.login-form .form-control {
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
}
.login-footer a {
    color: #502c6c;
}
.login-footer a:hover {
    color: #281636;
}

/* ── Game profile cards ─────────────────────────────────────────────── */
.game-profile-card {
    background: #fff;
    border-radius: 0.5rem;
    border-left: 4px solid #502c6c;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: all 0.15s ease;
}
.game-profile-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.game-profile-card .game-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}
.game-profile-card .stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}
.game-profile-card .stat-label {
    color: #6c757d;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Quick search ───────────────────────────────────────────────────── */
.quick-search {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

/* ── Pagination ─────────────────────────────────────────────────────── */
.page-link {
    color: #502c6c;
    border-radius: 2rem !important;
    margin: 0 2px;
}
.page-item.active .page-link {
    background-color: #502c6c;
    border-color: #502c6c;
}

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-content {
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* ── Alert ──────────────────────────────────────────────────────────── */
.alert {
    border: 0;
    border-radius: 0.5rem;
    font-weight: 400;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.app-footer {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 400;
}

/* ── Mobile / Narrow screen ─────────────────────────────────────────── */
@media (max-width: 768px) {
    body { padding-top: 56px; }
    .navbar-brand { font-size: 1rem; }
    .jumbotron-hero { padding: 1.5rem 0.75rem; }
    .jumbotron-hero h1 { font-size: 1.5rem; }
    .login-card { padding: 1.5rem; margin: 1rem; }
    .card-header { font-size: 0.875rem; padding: 0.75rem 1rem; }
    .card-body { padding: 0.75rem; }
    .stat-card { padding: 0.875rem; }
    .stat-card-value { font-size: 1.25rem; }
    .btn-lg { padding: 0.5rem 1.25rem; font-size: 1rem; }
    .form-select-sm { font-size: 0.85rem; }
    table { font-size: 0.8rem; }
}

/* ── Utility ────────────────────────────────────────────────────────── */
.text-mono {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
}
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6c757d;
}
.empty-state .bi {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}
.bg-purple { background-color: #502c6c !important; }
.text-purple { color: #502c6c !important; }
