/* ---------------------------------------------------- */
/* MODERN USER PROFILE STYLES (v3 - Force Reload)       */
/* ---------------------------------------------------- */
:root {
    --primary: #3b82f6; 
    --primary-dark: #2563eb;
    --accent: #f59e0b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8; /* Slate-400 */
    --border: rgba(255,255,255,0.08); /* White/8% */
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

/* ========================================
   1. HERO SECTION (REMASTERED)
   ======================================== */
.profile-hero {
    position: relative;
    height: 420px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 40px;
    margin-bottom: 0;
    background-color: #000;
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/bandits_19.webp'); 
    background-size: cover;
    background-position: center 30%;
    filter: brightness(0.5);
    z-index: 1;
}

.profile-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, 
        rgba(15,23,42,0.3) 0%, 
        rgba(15,23,42,0.8) 60%, 
        rgba(15,23,42,1) 100%);
    z-index: 2;
}

.profile-hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
}

.profile-hero-inner {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    padding: 0 20px; /* safety padding */
}

/* Avatar floating */
.profile-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    object-fit: cover;
    background: #000;
}

.rank-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}
.rank-icon { width: 24px; height: 24px; }

/* Hero Text */
.profile-hero-text {
    flex-grow: 1;
    padding-bottom: 5px;
}

.profile-callsign {
    font-family: 'Horizon', sans-serif;
    font-size: 3.5rem;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.profile-realname {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.role-pill {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.25);
    text-transform: uppercase;
}

/* Actions in Hero */
.profile-hero-actions {
    padding-bottom: 15px;
}

.btn-back-roster {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.08); /* Glassy */
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    font-weight: 500;
    letter-spacing: 0.5px;
}
.btn-back-roster:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ========================================
   2. CONTENT LAYOUT
   ======================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-section {
    margin-bottom: 60px;
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}
/* Stagger animations if possible via JS, or just allow plain CSS */
.profile-section:nth-child(1) { animation-delay: 0.1s; }
.profile-section:nth-child(2) { animation-delay: 0.2s; }
.profile-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-title {
    font-family: 'Horizon', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* --- GRID LAYOUT --- */
.info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 and 1/3 */
    gap: 30px;
}

.bio-card, .info-box-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bio-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
}
.bio-text p { margin-bottom: 1rem; }

/* Stats Mini-Banner embedded */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}
.mini-stat {
    text-align: center;
}
.mini-stat-val {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    line-height: 1.2;
}
.mini-stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #64748b;
    letter-spacing: 1.5px;
    margin-top: 5px;
}

/* Personal Info Rows */
.info-box-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }

.info-label {
    font-size: 0.85rem;
    color: #64748b; /* muted blue-grey */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.info-value {
    font-family: 'Oswald', sans-serif;
    color: #e2e8f0; /* lighter text */
    font-size: 1.1rem;
    text-align: right;
}

/* Modules */
.modules-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(30, 41, 59, 0.4); /* darker wrapper */
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    justify-content: center;
}
.module-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 15px;
    gap: 10px;
    transition: transform 0.2s, background 0.2s;
    border-radius: 8px;
}
.module-pill:hover { 
    transform: translateY(-4px); 
    background: rgba(255,255,255,0.03);
}
.module-img { 
    height: 48px; 
    width: auto; 
    object-fit: contain; 
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.4)); 
}
.module-name { 
    font-size: 0.75rem; 
    color: #cbd5e1; 
    text-align: center; 
    font-weight: 500;
}

/* History Table */
.history-container {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden; /* rounded corners fix */
}
.modern-table {
    width: 100%;
    border-collapse: collapse;
}
.modern-table th {
    background: rgba(0,0,0,0.2);
    padding: 20px 30px;
    text-align: left;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    color: #94a3b8;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
.modern-table td {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #f1f5f9;
    font-weight: 500;
}
.modern-table tr:hover { background: rgba(255,255,255,0.02); }
.modern-table tr:last-child td { border-bottom: none; }

.mission-pill {
    background: rgba(16, 185, 129, 0.15); /* Greenish tint */
    color: #6ee7b7;
    padding: 4px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Medals (Wide) */
.medals-section-wide {
    background: linear-gradient(to right, var(--bg-card), #162032);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}
.medals-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    min-height: 140px;
    align-items: center;
    margin-top: 20px;
}
.medal-placeholder {
    width: 90px;
    height: 110px;
    border: 2px dashed rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 900px) {
    .info-grid { grid-template-columns: 1fr; }
    .profile-hero-inner { flex-direction: column; align-items: center; text-align: center; padding-bottom: 20px; }
    .profile-hero-text { padding-bottom: 0px; }
    .profile-hero-actions { width: 100%; display: flex; justify-content: center; margin-top: 15px; }
    .profile-avatar-img { width: 140px; height: 140px; }
    .profile-callsign { font-size: 2.5rem; }
    .stats-banner { grid-template-columns: 1fr; gap: 30px; }
    .modern-table th, .modern-table td { padding: 15px; }
}
