/* One file for account: the parts that used to be separate files follow in their old order, each in its old layer. */
/* main.css */

/* 1. Define your layer order. */
@layer reset, global, layout, components, overrides;

@import url("../components/reset.fb54b2947a87.css");

/* ==== variables.css (layer variables) ==== */
@layer variables {
/* variables.css - A minimal set of variables with clear names */

:root {

  /* The main neon green color used everywhere for text, borders, and buttons. */

  /* The darker shade of green for gradients. */
  --game-primary-color-dark: #00cc6a;

  /* The orange/red color used for items. */
  --game-item-color: #ff6b35;

  /* The main text color for paragraphs and info. */
  --game-text-color: var(--surface-3);

}
}

/* ==== global.css (layer global) ==== */
@layer global {
/* global.css */

/* Reset and base styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
  text-align: center;
}

/* Links */
a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-gold);
}

/* Buttons */

.btn-secondary {
  background-color: var(--accent-gold);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--accent-gold-dark);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Form elements */
input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 1rem;
  background-color: white;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px rgba(0, 128, 128, 0.2);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mb-2 { margin-bottom: 1rem; }

.mt-3 { margin-top: 1.5rem; }

/* Hide elements on mobile */
@media (max-width: 768px) {
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Global Styles - Reusable components and utilities */

/* HR Elements */
.hr-category-gradient {
    border: none;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--text-main), transparent);
    margin: 5px 0;
}

.hr-category-double {
    border: none;
    height: 4px;
    background: linear-gradient(to right, 
        transparent 0%, 
        var(--text-main) 50%, 
        transparent 100%
    );
    position: relative;
    margin: 5px 0;
}

/* Utility Classes */
.no-results {
    text-align: center;
}

.no-results img {
    display: block;
    margin: 1rem auto;
}

/* Color Variables (CSS Custom Properties) */
:root {
    --primary-brown: rgba(108, 76, 36);
    --primary-brown-light: rgba(108, 76, 36, 0.3);
    --primary-brown-muted: rgba(108, 76, 36, 0.6);
    --text-muted: var(--ink-2);
    --border-light: var(--surface-3);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --success-color: green;
}
}

/* ==== layout.css (layer layout) ==== */
@layer layout {
.login-container {
  max-width: 600px;
  margin: 2.5rem auto 0;
  padding: 0 .5rem;
}

/* Title above form */
.form-title {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--dark-bg);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-left: 1rem;
  padding: 0 0 .4rem .2rem;
}

/* Login form: fields + vertical button */
.login-form {
  display: flex;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}

.login-form-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: .75rem .6rem;
  box-sizing: border-box;
  min-width: 0;
  background: var(--accent-teal);
}

.auth-field {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: .45rem .55rem;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(158, 59, 59, .2);
  border-radius: 10px;
  font-size: .9rem;
  color: var(--gold-dark-2);
  box-sizing: border-box;
  transition: border-color .15s, background .15s;
}

.auth-input::placeholder {
  color: var(--ink-2);
}

.auth-input:focus {
  outline: none;
  border-color: var(--danger-dark);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(158, 59, 59, .12);
}

/* Alerts */

.auth-error {
  color: var(--danger);
  font-size: 0.875rem;
}

.auth-input.auth-invalid {
  border-color: var(--danger);
}

@media (max-width: 480px) {
  .login-container { margin: 2.5rem auto 0; padding: 0 2px; }
  .login-form-fields { padding: .6rem .4rem; }
}
}

/* ==== player_detail.css (layer components) ==== */
@layer components {
/* Main Page Layout */
.page-grid {
    max-width: 1900px;
    margin: 0 auto;
    padding: 2px;
    font-family: 'Roboto', sans-serif;
  }
  
  
  .title-section {
    margin-bottom: 10px;
    text-align: center;
  }
  
  .title-section h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 5px;
  }
  
  .title-section h2 {
    font-size: 1rem;
    color: var(--ink-2);
    font-weight: normal;
  }
  
  /* Profile Content Layout */
  .profile-content {
    background-color: #EFDCAB;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
  }
  
  .profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }
  
  /* Player Info Card */
  .player-info-card {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Avatar on the left, name / level / faction stacked on the right */
  /* The card is a centred flex column, so a child that does not claim the
     width shrinks to its content. These two fill it. */
  .player-identity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px;
    width: 100%;
  }

  .player-identity > svg,
  .player-identity > .profile-image {
    flex: none;
    margin: 0;
    width: 220px;
    height: 220px;
  }

  .player-identity__data {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    text-align: left;
  }

  .player-identity__name {
    font-family: 'Roboto', sans-serif;
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.1;
    color: #16351F;
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #F4B942;
  }

  .player-identity__country {
    font-size: 1.1rem;
    font-weight: 500;
  }

  /* Credits sit with the name — the one number that belongs to identity */
  .player-identity__credits {
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  .player-identity__credits-value {
    font-family: 'Roboto', sans-serif;
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1;
    color: #16351F;
  }

  .player-identity__credits-label {
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #24503C;
  }

  .player-identity__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .player-identity__level,
  .player-identity__faction {
    padding: 2px 8px;
    border: 1px solid #16351F;
    border-radius: 3px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .player-identity__level {
    background-color: var(--accent-teal);
    color: #F4B942;
    text-transform: uppercase;
  }

  .player-identity__faction {
    background-color: #24503C;
    color: #EFDCAB;
  }

  /* Instrument strip: one dark band, gold figures over cream labels.
     Was six competing chips wedged beside the name. */
  .player-meters {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 12px;
    background-color: #16351F;
    border-top: 2px solid var(--gold-bright);
    border-bottom: 2px solid var(--gold-bright);
  }

  .meter {
    flex: 1 1 0;
    min-width: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    padding: 7px 4px;
    border-left: 1px solid #2E5D46;
    text-decoration: none;
    text-align: center;
  }

  .meter:first-child {
    border-left: 0;
  }

  .meter__value {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    color: #F4B942;
  }

  .meter__label {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: #EFDCAB;
  }

  .meter--link .meter__value {
    color: var(--surface);
  }

  .meter--link:hover {
    background-color: #24503C;
  }

  .meter--link:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: -3px;
  }

  /* Carries the instrument strip on to the ranking: same band, one line,
     no second colour introduced. */
  .player-board-link {
    display: block;
    width: 100%;
    padding: 9px 4px;
    background-color: #16351F;
    border-bottom: 2px solid #F4B942;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    color: #F4B942;
  }

  .player-board-link:hover {
    background-color: #24503C;
  }

  .player-board-link:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: -3px;
  }

  /* Advertising space: a real card, not floating text */
  .player-ad {
    width: 100%;
    max-width: 640px;
    margin: 10px auto 0;
    padding: 10px 12px;
    background-color: var(--surface);
    border: 2px solid #16351F;
    border-radius: 4px;
  }

  .player-ad__title {
    margin: 0 0 4px;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #24503C;
  }

  .player-ad__body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #16351F;
  }

  /* One action row. EDIT leads, the rest stay quiet. */
  .player-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 4px;
    width: 100%;
  }

  .pact {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border: 2px solid #16351F;
    border-radius: 4px;
    background-color: #E8F0E6;
    color: #16351F;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    cursor: pointer;
  }

  .pact--primary {
    background-color: var(--accent-teal);
    color: var(--surface);
    padding: 7px 26px;
  }

  .pact--danger {
    background-color: #C2185B;
    color: var(--surface);
  }

  .pact:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
  }

  /* The free seat: gold when spent, quiet when empty. It reads as one
     chip, so the action sits inside the same border as the name. */
  .pact--seat {
    gap: 8px;
    background-color: var(--gold-light);
  }

  .pact--seat-empty {
    background-color: #E8F0E6;
  }

  /* A chip that carries an action strip gives up its own padding to the
     label, so the strip can stretch the full height and fuse to the
     border. Album's DEL recipe. */
  .pact--stripped {
    padding: 0;
    overflow: hidden;
  }

  .pact--stripped .pact-seat__label,
  .pact--stack .pact-seat__label {
    padding: 7px 0 7px 14px;
  }

  /* Naming someone needs a real field, so the empty chip stacks: label
     and strip on top, the name across the full width underneath. */
  .pact--stack {
    flex-direction: column;
    align-items: stretch;
    gap: 0;            /* the seat chip's own gap would stack vertically */
    padding: 0;
    overflow: hidden;
  }

  .pact-seat__row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
  }

  /* Naming the person is how the seat is spent, so the empty chip is a
     field rather than a label. */
  .pact-seat__name {
    width: 100%;
    min-width: 0;
    padding: 7px 14px;
    border: none;
    border-top: 2px solid #16351F;
    background: transparent;
    color: #16351F;
    font: inherit;
  }

  .pact-seat__name:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
  }

  /* One strip, two jobs: gold adds, pink removes. Album's DEL shape. */
  .pact-seat__strip {
    align-self: stretch;
    display: flex;
    margin-left: auto;
    height: 100%;
    border: none;
    border-left: 2px solid #16351F;
    border-radius: 0;
    padding: 0 14px;
    font: 700 1rem/1 'Roboto', sans-serif;
    color: #16351F;
    cursor: pointer;
    align-items: center;
  }

  .pact-seat__strip--add {
    background: var(--accent-gold);
  }

  .pact-seat__strip--add:hover {
    background: #e0c04f;
  }

  .pact-seat__strip--del {
    background: var(--accent-pink);
  }

  .pact-seat__strip--del:hover {
    background: var(--accent-pink-soft);
  }

  .pact-seat__strip:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: -3px;
  }

  /* The guest side of the same seat: one chip saying whether my host may
     log meals for me. Teal when open, quiet when shut. */
  .pact--meals {
    background-color: var(--accent-teal);
    color: var(--surface);
  }

  .pact--meals-off {
    background-color: #E8F0E6;
    color: #16351F;
  }

  /* Motto: one line, text left, label right */
  .player-motto-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background-color: #FFF5E4;
    border-top: 2px solid #16351F;
    border-bottom: 2px solid #16351F;
  }

  .player-motto-row__text {
    font-size: 1.05rem;
    font-weight: 600;
    font-style: italic;
    color: #22313f;
    overflow-wrap: anywhere;
  }

  .player-motto-row__label {
    flex: none;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #24503C;
  }

  .player-motto {
    background-color: #f1f5f9;
    width: 100%;
    text-align: center;
  }
  
  .player-info {
    width: 100%;
    text-align: center;
  }
    
  .player-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
  }
  
  .player-info p {
    margin: 10px 0;
    color: var(--ink-2);
  }
  
  .player-info strong {
    font-weight: 600;
    color: var(--text-main);
  }
  
  .bio {
    width: 100%;
    margin-top: 2px;
    padding: 10px;
    background-color: #f1f5f9;
    border-radius: 6px;
    box-sizing: border-box;
  }

  .player-motto {
    box-sizing: border-box;
  }

  .player-bio .floor-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    padding: 6px 10px;
    border: 2px solid #DECEBE;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, color 0.3s;
    box-sizing: border-box;
    line-height: 1;
  }

  .player-bio .edit-profile-green {
    background-color: #28a745;
    color: #DECEBE;
  }

  .player-bio .edit-profile-green:hover,
  .player-bio .edit-profile-green:focus {
    background-color: #FA9386;
    color: rgba(0, 0, 0, 0.5);
  }
  
  .bio h4 {
    font-size: 1rem;
    color: #3498db;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .edit-profile-button {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 16px;
    background-color: var(--accent-teal);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
  }
  
  .edit-profile-button:hover {
    background-color: var(--accent-teal-dark);
  }

  .player-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .player-actions .floor-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 10px;
    border: 2px solid #DECEBE;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    background-color: #155E95;
    color: #DECEBE;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1;
    box-sizing: border-box;
  }

  .player-actions .floor-link:hover,
  .player-actions .floor-link:focus {
    background-color: #FA9386;
    color: rgba(0, 0, 0, 0.5);
  }

  .player-actions .btn-emoji {
    font-size: 1.05rem;
    line-height: 1;
  }

  @media (max-width: 480px) {
    .player-actions {
      gap: 8px;
    }
    .player-actions .floor-link {
      padding: 3px 6px;
      font-size: 0.9rem;
    }
  }

  /* Stats and Badges Section */
  .stats-badges-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  /* Stats Card */
  .stats-card {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  .stats-card h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--surface-3);
  }
  
  .stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  
  .stat-item {
    text-align: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #3498db;
  margin-bottom: 5px;
}

.stat-number.positive {
  background-color: #C6F4C5; /* or any green color you prefer */
}

.stat-number.negative {
  background-color: #FFC5C5; /* light rose color */
}
  
  .stat-label {
    font-size: 0.9rem;
    color: var(--ink-3);
  }

  /* Credits live in the vault — the profile carries one link to them */
  /* Scoped to the card so the 600px .stats-container rule cannot override them */
  .stats-card .stats-container--pair {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-card .stats-container--solo {
    grid-template-columns: 1fr;
  }

  .stat-item--link .stat-number {
    color: var(--surface);
    letter-spacing: 0.06em;
  }

  .stat-item--link .stat-label {
    color: var(--surface);
  }

  /* A motto is a sentence, not a number — scoped so the 480px .stat-number
     rule cannot blow it back up to 1.4rem */
  .stat-item .stat-number--motto {
    font-size: 1.05rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.35;
    color: #22313f;
    overflow-wrap: anywhere;
  }

  /* Recent Activity Card */
  /* Album recipe: charcoal band + gold hairline, 2px ink borders, solid pills */
  .recent-activity-card {
    background-color: var(--surface);
    border: 2px solid var(--dark-surface);
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .recent-activity-card h3 {
    margin: 0;
    padding: 9px 12px;
    background-color: var(--bg-footer);
    border-bottom: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  
  .table-wrapper {
    overflow-x: auto;
  }
  
  .activity-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .activity-table th {
    padding: 8px 10px;
    text-align: left;
    background-color: var(--dark-surface);
    color: var(--cream);
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-right: 2px solid var(--bg-footer);
  }

  .activity-table th:last-child {
    border-right: 0;
  }

  .activity-table td {
    padding: 9px 10px;
    border-bottom: 2px solid var(--dark-surface);
    color: var(--dark-surface);
    font-weight: 700;
  }

  .activity-table tr:last-child td {
    border-bottom: 0;
  }

  /* The pills carry the result colour — no washed-out row tints */
  .win-row,
  .loss-row {
    background-color: transparent;
  }

  .opponent-link {
    color: var(--dark-surface);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 800;
  }

  .opponent-link:hover {
    color: var(--accent-teal);
  }

  .result-badge {
    display: inline-block;
    min-width: 82px;
    padding: 4px 8px;
    border: 2px solid var(--dark-surface);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
  }

  .win {
    background-color: #1FB81F;
    color: var(--surface);
  }

  .loss {
    background-color: var(--accent-pink);
    color: var(--dark-surface);
  }
  
  .no-recent-activity {
    text-align: center;
    padding: 14px;
    margin: 0;
    color: var(--dark-surface);
    font-weight: 700;
  }
  
  /* Badges Card */
  /* Same album recipe as the matches card, so the two read as one system */
  .badges-card {
    background-color: var(--cream);
    border: 2px solid var(--dark-surface);
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .badges-card h3 {
    margin: 0;
    padding: 9px 12px;
    background-color: var(--bg-footer);
    border-bottom: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .badge-item {
    background-color: var(--cream);
    border: 2px solid var(--dark-surface);
    border-radius: 4px;
    padding: 12px 8px;
    text-align: center;
    position: relative;
    transition: transform 0.2s;
  }
  
  .badge-item:hover {
    transform: translateY(-3px);
  }
  
  .badge-image {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
  }
  
  .badge-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--dark-surface);
    margin-bottom: 3px;
  }

  .badge-date {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ink-2);
  }
  
  .info-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 1rem;
  }
  
  .info-icon:hover {
    color: #2980b9;
  }
  
  .no-badges {
    text-align: center;
    padding: 20px;
    color: var(--ink-3);
    font-style: italic;
  }
  
  /* Tooltip styles */
  [data-tooltip] {
    position: relative;
  }
  
  [data-tooltip]:after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
  }  
  
  [data-tooltip]:hover:after {
    opacity: 1;
  }
  

/* --- End Simplified Player Level Display Styling --- */

.player-level-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.player-level-icon-container {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.level-icon-large {
  width: 150px;  /* Adjust size as needed */
  height: auto; /* Adjust size as needed */
}

.level-icon-raw-large {
  font-size: 64px; /* For icon fonts - adjust as needed */
  display: block;
}

.level-icon-large-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
}

.artistic-player-display {
  position: relative;
  display: inline-block;
  padding: 0.5rem 1.5rem;
  margin: 1.5rem 0;
}

.username-frame {
  position: relative;
  border-left: 2px solid #F4B942;
  border-right: 2px solid #F4B942;
  padding: 0.6rem 2rem;
  background-color: #6A9C89;
}

.username-text {
  font-family: 'Roboto', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #F4B942;
  margin: 0;
  letter-spacing: 1px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
  text-shadow: 
    2px 2px 0 rgba(0,0,0,0.2),
    -1px -1px 0 rgba(255,255,255,0.3),
    0 1px 3px rgba(50,50,50,0.3);
  transform: perspective(500px) rotateX(5deg);
  transform-origin: center center;
}

.star-accent {
  font-size: 1.4rem;
  color: #F4B942;
  vertical-align: middle;
  margin: 0 6px;
  text-shadow: 
    2px 2px 2px rgba(0,0,0,0.3),
    -1px -1px 0 rgba(255,255,255,0.2),
    0 0 4px rgba(255,204,0,0.5);
  transform: translateZ(5px);
  display: inline-block;
}

.corner-accent {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6A9C89, #3a6d96);
  box-shadow: 
    inset -2px -2px 3px rgba(0,0,0,0.3),
    inset 2px 2px 3px rgba(255,255,255,0.3),
    0 2px 4px rgba(0,0,0,0.4);
  transform: translateZ(3px);
}

.top-left {
  top: -6px;
  left: -6px;
}

.top-right {
  top: -6px;
  right: -6px;
}

.bottom-left {
  bottom: -6px;
  left: -6px;
}

.bottom-right {
  bottom: -6px;
  right: -6px;
}

.accent-line {
  position: absolute;
  height: 3px;
  width: 70%;
  background: linear-gradient(90deg, #F4B942, #5f9ea0, #F4B942);
  left: 15%;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.4),
    0 0 6px rgba(255,204,0,0.5);
  transform: translateZ(2px);
  border-radius: 1.5px;
  overflow: hidden;
}

.accent-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.3), 
    rgba(255,255,255,0.7), 
    rgba(255,255,255,0.3));
}

.top-line {
  top: 0;
}

.reputation-display {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0.8rem 0;
  width: 240px;
  padding: 0.4rem 0.6rem;
  background: linear-gradient(to right, rgba(70, 130, 180, 0.1), rgba(70, 130, 180, 0.2), rgba(70, 130, 180, 0.1));
  border-radius: 4px;
}

.reputation-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink-2);
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reputation-value {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: #4682b4;
  position: relative;
  text-shadow: 
    1px 1px 1px rgba(0,0,0,0.2),
    -1px -1px 0 rgba(255,255,255,0.3);
  background-color: white;
  width: 2.5rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.15),
    inset 0 1px 3px rgba(255,255,255,0.8);
  margin: 0 4px;
}

.reputation-icon {
  margin-left: 6px;
  color: #F4B942;
  font-size: 0.9rem;
  display: inline-block;
  transform: translateZ(2px);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.reputation-bar {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(to right, transparent, #4682b4, transparent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* NEW */

@keyframes pulse-legend {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 69, 0, 1); }
    50% { box-shadow: 0 0 40px rgba(255, 69, 0, 1); }
}

@keyframes pulse-champion {
    0%, 100% { box-shadow: 0 0 35px rgba(255, 223, 0, 1); }
    50% { box-shadow: 0 0 50px rgba(255, 223, 0, 1); }
}

/* Subscription Page */
.sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.sub-header h1 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin: 0;
}

.sub-back-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #3498db;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #3498db;
  border-radius: 4px;
}

.sub-back-link:hover {
  background: #3498db;
  color: var(--surface);
}

.sub-section {
  margin-bottom: 1rem;
}

.sub-empty {
  color: var(--ink-2);
  font-size: 0.9rem;
}

.sub-table th {
  text-align: left;
  padding: 8px 10px;
  background: rgba(0,0,0,0.05);
  font-weight: 700;
  color: #2c3e50;
  border-bottom: 2px solid rgba(0,0,0,0.1);
}

.sub-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: var(--text-main);
}

.sub-table tr:nth-child(even) {
  background: rgba(0,0,0,0.03);
}

.sub-table tr.sub-row--used {
  background: #fce4e4;
}

.badge-quantity {
  font-size: 0.875rem;
  color: var(--ink-2);
}

  /* Responsive Design */
  @media (max-width: 768px) {
    .page-grid {
      padding: 0;
    }

    .profile-content {
      border-radius: 0;
      box-shadow: none;
    }

    .profile-grid {
      grid-template-columns: 1fr;
      gap: 0;
      padding: 0;
    }

    .player-info-card {
      padding: 0.5rem 0;
      border-radius: 0;
      box-shadow: none;
    }

    .stats-badges-section {
      gap: 0;
      padding: 0;
    }

    .stats-container {
      grid-template-columns: repeat(2, 1fr);
    }

    .badges-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .stats-card {
      padding: 10px 0;
      border-radius: 0;
      box-shadow: none;
    }
  }
  
  @media (max-width: 480px) {
    .profile-image {
      width: 120px;
      height: 120px;
    }

    .player-identity {
      gap: 6px;
      padding: 2px;
    }

    .player-identity > svg,
    .player-identity > .profile-image {
      width: 150px;
      height: 150px;
    }

    .player-identity__credits-value {
      font-size: 1.5rem;
    }

    .player-identity__credits-label {
      font-size: 0.875rem;
    }

    .player-identity__name {
      font-size: 1.2rem;
    }

    .player-identity__level,
    .player-identity__faction {
      font-size: 0.875rem;
      padding: 2px 5px;
    }

    .player-meters {
      margin-top: 8px;
    }

    .meter {
      min-width: 88px;
      padding: 5px 2px;
    }

    .meter__value {
      font-size: 1.25rem;
    }

    .meter__label {
      font-size: 0.875rem;
      letter-spacing: 0.02em;
    }

    .player-board-link {
      padding: 7px 2px;
      font-size: 0.875rem;
      letter-spacing: 0.1em;
    }

    .player-ad {
      margin-top: 6px;
      padding: 6px 2px;
      border-radius: 0;
    }

    .player-actions {
      gap: 3px;
      margin: 8px 0 2px;
    }

    .pact {
      padding: 6px 8px;
      font-size: 0.875rem;
    }

    .pact--primary {
      padding: 6px 16px;
    }

    .pact--seat,
    .pact--meals {
      gap: 6px;
      padding: 6px 8px;
    }

    /* ...but a chip that carries a strip keeps the same geometry as on
       desktop: the padding lives on the label, never on the chip. */
    .pact--stripped,
    .pact--stack {
      gap: 0;
      padding: 0;
    }

    .pact-seat__name {
      padding: 6px 8px;
    }

    .pact--stripped .pact-seat__label,
    .pact--stack .pact-seat__label {
      padding: 6px 0 6px 8px;
    }

    .pact-seat__strip {
      padding: 0 10px;
    }

    .player-motto-row {
      padding: 6px 2px;
    }

    .player-motto-row__text {
      font-size: 0.95rem;
    }

    .title-section {
      margin-top: 0.5rem;
      margin-bottom: 0;
    }

    .title-section h1 {
      font-size: 1.5rem;
    }

    .stat-item {
      padding: 8px 2px;
    }

    .stat-number {
      font-size: 1.4rem;
    }

    .stat-item .stat-number--motto {
      font-size: 0.95rem;
    }

    .stats-card h3 {
      font-size: 1.2rem;
      margin-bottom: 10px;
    }

    .badges-card h3 {
      padding: 7px 2px;
    }

    .badges-grid {
      padding: 2px;
      gap: 4px;
    }

    .badge-item {
      padding: 8px 2px;
    }

    .activity-table th,
    .activity-table td {
      padding: 6px 2px;
      font-size: 0.875rem;
    }

    .activity-table th {
      font-size: 0.875rem;
      letter-spacing: 0.04em;
    }

    .result-badge {
      min-width: 62px;
      padding: 3px 4px;
      font-size: 0.875rem;
    }

    .recent-activity-card h3 {
      padding: 7px 2px;
    }
  }
}

/* ==== player_edit.css (layer components) ==== */
@layer components {
/* player_edit.css - Enhanced Professional Design with Compact Fields */

/* Palette matched to the profile page: ink, gold, cream, teal */
:root {
    --primary-color: var(--accent-teal);
    --primary-hover: var(--accent-teal-dark);
    --secondary-color: var(--accent-gold);
    --success-color: #1FB81F;
    --danger-color: var(--accent-pink);
    --danger-text: #B0135C;
    --light-bg: #FFF5E4;
    --dark-text: var(--dark-surface);
    --medium-text: var(--bg-footer);
    --light-text: var(--ink-2);
    --border-color: var(--dark-surface);
    --input-bg: #EAD191;
    --input-border: var(--dark-surface);
    --input-focus-bg: #FFF5E4;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  body {
    background-color: #EFDCAB;
  }
  
  .page-grid {
    display: grid;
    grid-template-rows: auto auto auto;
    align-items: start;
    padding: 0.1rem;
  }
  
  .title-section {
    margin-bottom: 0;
    text-align: center;
    position: relative;
    padding-bottom: 1.5rem;
  }
  
  .title-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
  }
  
  h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
  }
  
  h2 {
    font-size: 1.1rem;
    color: var(--medium-text);
    font-style: italic;
    font-weight: 500;
    margin-bottom: 0;
  }
  
  .form-container {
    background-color: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    max-width: 700px; /* Reduced from 850px */
    margin: 0 auto;
    width: 100%;
    transition: all 0.3s ease;
  }
  
  .profile-container {
    display: grid;
    grid-template-columns: 150px 1fr; /* Left column fixed width, right column flexible */
    align-items: center;
    gap: 20px;
}

.left-column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the image & label */
}

.--profile-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
}

.right-column {
    display: flex;
    align-items: center;
}

.image-upload-wrapper a {
  display: none; /* This removes the link to the saved image */
}

input[type="file"] {
  display: none; /* Hide default input */
}

.custom-file-label {
  background-color: var(--primary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

#file-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark-text);
}

#file-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark-text);
}

  
  .profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }
  
  .form-section {
    margin-bottom: 1.5rem; /* Reduced from 2rem */
    background-color: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem; /* Reduced from 1.5rem */
    transition: all 0.3s ease;
  }
  
  .form-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  }
  
  .form-section h3 {
    margin-top: 0;
    margin-bottom: 1rem; /* Reduced from 1.25rem */
    position: relative;
    padding-bottom: 0.5rem; /* Reduced from 0.75rem */
    color: var(--dark-text);
    font-weight: 600;
    font-size: 1.2rem; /* Reduced from 1.3rem */
  }
  
  .form-section h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
  }
  
  /* Modified grid for more compact appearance */
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem; /* Reduced from 1.25rem */
    max-width: 100%;
  }
  
  .form-group {
    margin-bottom: 0.75rem; /* Reduced from 1rem */
  }
  
  /* Modified input field styling for compact appearance */
  .form-control {
    /*width: 100%;*/
    width: 250px;
    padding: 0.5rem 0.75rem; /* Reduced from 0.75rem 1rem */
    border: 2px solid var(--input-border); /* Reduced from 3px */
    border-radius: 0.5rem;
    font-size: 0.95rem; /* Reduced from 1rem */
    line-height: 1.5;
    transition: all 0.2s ease-in-out;
    background-color: var(--input-bg);
    color: var(--dark-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Reduced shadow */
    max-width: 100%;
  }
  
  .form-control:focus {
    border-color: var(--dark-surface);
    background-color: var(--input-focus-bg);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.65);
  }

  .form-control.is-invalid {
    border-color: var(--danger-text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23B0135C' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath stroke-linejoin='round' d='M6 3.75v2.5M6 8.25h.01'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
  }

  .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(176, 19, 92, 0.3);
  }

  .invalid-feedback {
    color: var(--danger-text);
    display: block;
    margin-top: 0.25rem; /* Reduced from 0.375rem */
    font-size: 0.875rem; /* Reduced from 0.875rem */
    font-weight: 700;
  }
  
  .form-text {
    color: var(--light-text);
    display: block;
    margin-top: 0.25rem; /* Reduced from 0.375rem */
    font-size: 0.875rem; /* Reduced from 0.875rem */
  }
  
  .form-label {
    font-weight: 800;
    display: block;
    margin-bottom: 0.35rem; /* Reduced from 0.5rem */
    color: var(--dark-text);
    font-size: 0.9rem; /* Reduced from 0.95rem */
  }
  
  /* Input field highlight effect */
  .form-field-wrapper {
    position: relative;
    max-width: 100%;
  }
  
/* Single-column forms (like bio) should be more compact */
.form-section .form-field-wrapper:only-child {
  max-width: 500px;
  margin: 0 auto;
}

/* Bio field styling */
/* Make textarea fill the width of its closest form-section container */
.form-section textarea.form-control {
  min-height: 100px;         /* Reduced from 120px */
  width: 100%;               /* Fill width of form-section */
  max-width: 100%;           /* Prevents overflow outside form-section */
  margin: 0 auto;
  padding-right: 1rem;
  display: block;
  border-width: 2px;         /* Reduced from 3px */
  box-sizing: border-box;    /* Include padding and border in width */
}
  
  /* Special highlight for file upload fields */
  input[type="file"] {
    border: 2px dashed var(--input-border); /* Reduced from 3px */
    background-color: var(--light-bg);
    padding: 0.75rem; /* Reduced from 1rem */
  }
  
  .button-group {
    display: flex;
    gap: 0.75rem; /* Reduced from 1rem */
    margin-top: 1.5rem; /* Reduced from 2rem */
    justify-content: center;
  }
  
  .save-button {
    padding: 0.6rem 1.25rem; /* Reduced from 0.75rem 1.5rem */
    background-color: var(--primary-color);
    color: var(--surface);
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    font-size: 0.95rem; /* Reduced from 1rem */
    font-weight: 600;
    box-shadow: 0 3px 5px rgba(29, 38, 44, 0.2); /* Reduced shadow */
  }
  
  .save-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 7px rgba(29, 38, 44, 0.3); /* Reduced shadow */
  }
  
  .save-button:active {
    transform: translateY(0);
  }
  
  .cancel-button {
    padding: 0.6rem 1.25rem; /* Reduced from 0.75rem 1.5rem */
    background-color: var(--surface);
    color: var(--dark-text);
    text-decoration: none;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
    font-size: 0.95rem; /* Reduced from 1rem */
  }
  
  .cancel-button:hover {
    background-color: var(--light-bg);
    border-color: var(--light-text);
  }
  
  .delete-button {
    display: block;
    margin: 1.25rem auto 0; /* Reduced from 1.5rem */
    padding: 0.6rem 1.25rem; /* Reduced from 0.75rem 1.5rem */
    background-color: var(--danger-color);
    color: var(--dark-surface);
    text-decoration: none;
    border: 2px solid var(--dark-surface);
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    text-align: center;
    max-width: 200px; /* Reduced from 250px */
    font-size: 0.95rem; /* Reduced from 1rem */
    font-weight: 600;
    box-shadow: 0 3px 5px rgba(29, 38, 44, 0.2); /* Reduced shadow */
  }
  
  .delete-button:hover {
    background-color: var(--accent-pink-soft);
    transform: translateY(-2px);
    box-shadow: 0 5px 7px rgba(29, 38, 44, 0.3); /* Reduced shadow */
  }
  
  .delete-button:active {
    transform: translateY(0);
  }
  
  /* Responsive Styles */
  @media (max-width: 768px) {
    .form-grid {
      grid-template-columns: 1fr;
      gap: 0.75rem;
    }
    
    .form-container {
      padding: 1rem;
      border-radius: 0.5rem;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }
    
    .form-section {
      padding: 0.75rem;
      border-radius: 0.3rem;
    }
    
    .page-grid {
      gap: 1rem;
      padding: 0.5rem;
    }
    
    .button-group {
      flex-direction: column;
    }
    
    .button-group .save-button,
    .button-group .cancel-button {
      width: 100%;
      text-align: center;
    }
    
    h1 {
      font-size: 1.75rem;
    }
  }
  
  /* Extra small screens - ZERO PADDING */
  @media (max-width: 480px) {
    .form-container {
      padding: 0.5rem;
      margin: 0;
      width: 100%;
      border-radius: 0;
      box-shadow: none;
    }
    
    .form-section {
      padding: 0.5rem;
      margin-bottom: 0.75rem;
      border-radius: 0;
    }
    
    .profile-image {
      width: 100px;
      height: 100px;
    }
    
    .title-section {
      padding-bottom: 0.75rem;
    }
    
    .button-group {
      margin-top: 0.75rem;
      gap: 0.5rem;
    }
    
    .save-button, 
    .cancel-button, 
    .delete-button {
      padding: 0.5rem 0.75rem;
      font-size: 0.9rem;
    }
    
    .delete-button {
      margin-top: 0.75rem;
      max-width: 180px;
    }
    
    /* Container and spacing adjustments */
    .container, 
    .main-content, 
    .dashboard-wrapper,
    .page-grid {
      padding: 0;
      margin: 0;
      width: 100%;
      max-width: 100%;
    }
    
    .form-group {
      margin-bottom: 0.5rem;
    }
    
    .form-section h3 {
      font-size: 1.1rem;
      margin-bottom: 0.75rem;
    }
  }
  
  /* Very small screens - Extreme compactness */
  @media (max-width: 320px) {
    .form-grid {
      grid-template-columns: 1fr;
      gap: 0.25rem;
    }
    
    .form-field-wrapper, 
    .form-field-wrapper textarea.form-control {
      max-width: 100%;
      /*width: 250px;*/
      padding: 0;
      margin: 0;
    }
  
    .form-section {
      padding: 0.35rem;
      margin: 0.35rem 0;
      border-radius: 0;
    }
  
    .form-container {
      padding: 0.35rem;
      margin: 0;
      border-radius: 0;
      box-shadow: none;
    }
  
    .form-control {
      width: 250px; /* or any value you prefer */
      padding: 0.35rem;
      font-size: 0.875rem;
    }
  
    .page-grid {
      padding: 0;
      margin: 0;
      gap: 0.25rem;
    }
  
    .title-section {
      padding: 0.35rem 0;
      margin: 0.35rem 0;
    }
  
    .button-group {
      padding: 0;
      margin: 0.35rem 0;
      gap: 0.25rem;
    }
    
    /* Reduce all heading sizes */
    h1 {
      font-size: 1.5rem;
    }
    
    h2 {
      font-size: 0.9rem;
    }
    
    .form-section h3 {
      font-size: 1rem;
      margin-bottom: 0.5rem;
      padding-bottom: 0.35rem;
    }
  }
  
  /* Crispy forms overrides */
  .crispy-form .form-group {
    margin-bottom: 0.75rem !important;
  }
  
  /* Animation for form sections */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .form-section {
    animation: fadeIn 0.3s ease-out forwards;
  }
  
  .form-section:nth-child(2) {
    animation-delay: 0.1s;
  }
  
  .form-section:nth-child(3) {
    animation-delay: 0.2s;
  }
}

/* ==== components/buttons.css (layer components) ==== */
@layer components {
/* Auth button — shared for sign-in and register */
.btn-login {
    background: var(--dark-bg);
    color: var(--gold-bright);
    border: none;
    border-radius: 8px 0 0 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 2.2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 10px 26px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    text-shadow:
        0 0 8px rgba(255, 214, 102, .4),
        0 0 20px rgba(255, 214, 102, .15);
    box-shadow:
        inset 0 0 20px rgba(255, 214, 102, .06),
        4px 0 8px rgba(0, 0, 0, .4);
    transition: background .2s;
}

.btn-login:hover {
    background: var(--accent-teal-dark);
}

.join-button {
  display: inline-block;
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 16px;
  background-color: var(--accent-activity);
  color: var(--surface);
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.disclaimer-button {
  display: inline-block;
  flex: 1;
  text-align: center;
  width: 250px;
  margin-bottom: 16px;
  padding: 4px 8px;
  background-color: var(--accent-teal);
  color: var(--surface);
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

p {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}
}

/* ==== components/card.css (layer components) ==== */
@layer components {
.login-card {
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
}

.player-motto {
  text-align: center;
  font-style: italic;
  color: var(--ink-2);
  padding: 0.75rem 1rem;
  background-color: var(--surface-2);
  border-left: 3px solid var(--line);
  margin: 0.5rem 0;
}

        .profile-container {
            display: flex;
            align-items: flex-start;
            gap: 20px;
            padding: 20px;
            max-width: 600px;
            margin: 0 auto;
        }
        
        .left-column {
            text-align: center;
        }
        
        .profile-label {
            display: block;
            margin-top: 10px;
            font-weight: bold;
            color: var(--text-main);
        }
        
        .right-column {
            flex: 1;
        }
        
        .image-upload-wrapper {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .custom-file-label {
            display: inline-block;
            padding: 10px 20px;
            background-color: #007bff;
            color: white;
            border-radius: 5px;
            cursor: pointer;
            text-align: center;
            transition: background-color 0.3s ease;
        }
        
        .custom-file-label:hover {
            background-color: #0056b3;
        }
        
        #id_profile_image {
            display: none;
        }
        
        #file-name {
            font-size: 14px;
            color: var(--ink-2);
            font-style: italic;
        }
        
        .preview-actions {
            margin-top: 15px;
            display: none;
        }
        
        .preview-actions button {
            padding: 8px 16px;
            margin-right: 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }
        
        .reset-btn {
            background-color: var(--danger);
            color: white;
        }
        
        .reset-btn:hover {
            background-color: var(--danger-dark);
        }

/* 480 -- space is gold: the shell gives its padding back to the content. */
@media (max-width: 480px) {
  .profile-container { padding-left: 4px; padding-right: 4px; }
}
}

/* ==== components/forms.css (layer components) ==== */
@layer components {
.login-form {
  display: flex;
  flex-direction: row;
  gap: 0;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);  /* Use CSS Variable*/
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    color: var(--text-dark); /* Use CSS Variable*/
}

.form-control:focus {
    border-color: var(--primary-color); /* Use CSS variable */
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25); /* Use derived value from var */
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.forgot-password {
    background-color: var(--game-primary-color-dark);
    color: var(--game-text-color);  /* Use CSS variable */
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
}
.forgot-password:hover {
    text-decoration: underline;
}

/* --- Form Options (Remember Me) --- */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.form-check-input {
  margin-right: 0.5rem;
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--ink-3);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: var(--primary-color);  /* Use CSS variable */
  border-color: var(--primary-color);  /* Use CSS variable */
}

.form-check-input:checked::before {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
}

.form-check-label {
    color: var(--ink-2);  /* Use CSS variable */
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}
}
