/* === CSS Custom Properties === */
:root {
    --dark-brown-semi: rgba(61, 47, 31, 0.8);
    --dark-brown-solid: #3d2f1f;
    --light-edge: #f7f1e1;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition-speed: 0.15s;
}

/* === Reset & Base === */
html {
  overflow-y: scroll; /* Always show scrollbar to prevent layout shift */
  scrollbar-width: thin; /* For Firefox */
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent; /* For Firefox */
}

/* For Chrome, Safari, and Edge */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 2px solid transparent;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'RocknRoll One', sans-serif;
  background-color: #D0B36E;
  background-image: url('/shared/images/arena-bg.png');
  background-size: repeat;
  background-size: 400px;
  color: #2F2F2F;
  line-height: 1.6;
}

/* === Layout === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* === Typography === */
/* Header Styling (vintage look) */
h1, h2, h3, .ui-header {
    font-family: 'Arial Black', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--dark-brown-semi);
    background: url('/shared/images/button-tex.jpg') repeat center center;
    background-size: 50%;
    padding: 6px 12px;
    border: 1px solid var(--dark-brown-semi);
    border-radius: var(--border-radius);
    display: inline-block;
    box-shadow: inset 0 1px 0 var(--light-edge);
}

a {
  color: #4DA6FF;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === Buttons === */
/* Base button class with vintage styling */
.button, .button-vintage {
    font-family: 'Arial Black', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--dark-brown-semi);
    background: url('/shared/images/button-tex.jpg') repeat center center;
    background-size: 50%;
    background-color: #e0c99a; /* backup color */
    border: 2px solid var(--dark-brown-semi);
    border-radius: var(--border-radius);
    padding: 10px 18px;
    box-shadow:
        inset 0 1px 0 var(--light-edge),
        2px 3px 0 var(--shadow-color);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

/* Hover and Focus states */
.button:hover, .button:focus,
.button-vintage:hover, .button-vintage:focus {
    box-shadow:
        inset 0 1px 2px var(--shadow-color),
        1px 2px 0 var(--dark-brown-semi);
    transform: translateY(-1px);
    color: var(--dark-brown-solid);
}

/* Active (pressed) state */
.button:active, .button-vintage:active {
    box-shadow:
        inset 0 2px 4px var(--shadow-color);
    transform: translateY(1px);
    color: var(--dark-brown-solid);
}

/* Disabled state */
.button:disabled, .button-vintage:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Button variants with color overrides */
/* Primary (Green tint) */
.button-primary, .signup-btn {
    background-color: #c8d4a3; /* lighter green tint */
    border-color: #5A8F3E;
    color: #2d4a1a;
}
.button-primary:hover, .signup-btn:hover {
    color: #1a2e10;
    border-color: #4B7832;
}

/* Warning (Red tint) */
.button-warning {
    background-color: #e8c4c1; /* lighter red tint */
    border-color: #B8574E;
    color: #6b2c26;
}
.button-warning:hover {
    color: #4a1e1a;
    border-color: #9E423A;
}

/* === Forms === */
input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  border: 1px solid #c3ad7b;
  border-radius: 5px;
  background-color: #faf2dd;
  color: #666;
}

input:focus {
  outline: none;
  border-color: #5A8F3E;
  box-shadow: 0 0 0 2px rgba(90, 143, 62, 0.2);
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #3E3E3E;
}

/* === Vintage Labels === */
/* Label elements (like menu labels) */
.label-vintage {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--dark-brown-semi);
    background: url('/shared/images/button-tex.jpg') repeat center center;
    background-size: 50%;
    padding: 4px 8px;
    border: 1px solid var(--dark-brown-semi);
    border-radius: 6px;
}

/* === Containers === */
.panel {
  background-color: #708B4E;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  color: #FFFBE9;
}

.card {
  background-color: #F5E6C8;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* === Dividers === */
.divider {
  position: relative;
  width: 100%;
  text-align: center;
  margin: 20px 0;
}

.divider:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 45%;
  height: 1px;
  background-color: #B29572;
}

.divider:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 45%;
  height: 1px;
  background-color: #B29572;
}

.divider-text {
  display: inline-block;
  color: #3E3E3E;
  font-weight: 600;
  padding: 0 10px;
  position: relative;
  z-index: 1;
  background: none;
}

/* === Alerts & Feedback === */
.error-text {
  color: #A94442;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* === Header/Profile UI === */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #5A8F3E;
  color: #FFFBE9;
  padding: 10px 20px;
}

.header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === Tabs === */
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  background-color: #6E8D4E;
  padding: 12px 0;
}

.nav-tabs a {
  font-weight: bold;
  color: #FFFBE9;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.nav-tabs a:hover {
  background-color: #5C7D3F;
}

/* === Utility === */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
  display: none;
}
