/* includes/style.css */
:root {
  --bg: #0b1320;
  --panel: #003655;
  --text: #ffffff;
  --accent: #fef300;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle, #122147 0%, #0A1023 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100vh;
}

.container { max-width: 768px; margin: 0 auto; padding: 16px; }


/* Header Styles */
header {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.header-content {
    height: 50px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    color: #fef300;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.5rem;
    transform: rotate(-3.5deg);
    user-select: none;
    text-align: center;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .header-title {
    font-size: 1.875rem;
    }
}

/* Main container */
.container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    flex-direction: column;
}

/* Helpers */
.panel { background: var(--panel); border-radius: 8px; padding: 16px; }
.btn { background: var(--accent); color: #000; padding: 10px 14px; border: 0; border-radius: 6px; cursor: pointer; }
.link { color: #fff; text-decoration: unset; }
.btn-primary { background: var(--accent); color: #000; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600; text-decoration: none; }
.btn-up-right { position: absolute; top: 16px; right: 16px; }
.card { width: 100%; max-width: 500px; background: rgba(0, 0, 0, 0.3); border-radius: 12px; padding: 24px; margin: 24px; position: relative}
.card-tournament { background: rgba(0, 0, 0, 0) !important; padding: 0 !important; }
.card-wide { max-width: 960px; }
.row { display: flex; gap: 16px; }
.row > .col { flex: 1; }
.error { background: #7f1d1d; color: #fecaca; border: 1px solid #991b1b; padding: 12px; border-radius: 8px; margin: 0 0 16px 0; }
.warning-notice { background: #78350f; color: #fef3c7; border: 1px solid #92400e; padding: 12px; border-radius: 8px; margin: 0 0 16px 0; font-size: 14px; }
.field-error { color: #fecaca; font-size: 12px; margin-top: 6px; }
.actions { margin-bottom: 1.5rem }
.filters a { color: #e2e8f0; text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid #334155; font-size: 12px; }
.filters a.active { background: #1f2937; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #1f2937; font-size: 14px; }
th { color: #cbd5e1; font-weight: 600; }
td a { color: var(--accent); text-decoration: none; }
.empty { text-align: center; color: #9ca3af; padding: 24px 0; }

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.loader-message {
    color: #fef300;
    font-weight: 500;
    font-size: 1rem;
}
@keyframes spin {
    from {
    transform: rotate(0deg);
    }
    to {
    transform: rotate(360deg);
    }
}
.spinner-path {
    animation: spin 0.9s linear infinite;
    transform-origin: 22px 22px;
}

/* Content */
.content-card {
    background-color: rgba(0,0,0,.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    width: 100%;
    max-width: 420px;
}

/* Profile */
.profile-container {
    margin-top: -2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-figure {
  margin: 0;
  text-align: center;
  position: relative;
  display: inline-block;
}

.profile-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}

.profile-infos {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Role Selector */
.role-selector {
  position: relative;
  margin: 16px 0;
  width: 100%;
  max-width: 200px;
}

.role-selector-trigger {
  background-color: rgba(0,0,0,.3);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.role-selector-trigger:hover {
  background-color: rgba(0,0,0,.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.role-selector-trigger .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  transition: transform 0.2s ease;
}

.role-selector-trigger.active .material-symbols-rounded {
  transform: rotate(180deg);
}

.role-selector-dropdown {
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  background: #0A1023;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-top: 4px;
  z-index: 1000;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.role-selector-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.role-option {
  padding: 12px 16px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center
}

.role-option:last-child {
  border-bottom: none;
}

.role-option:hover {
  background: rgba(254, 243, 0, 0.1);
  color: #fef300;
}

.role-option.current {
  background: rgba(254, 243, 0, 0.2);
  color: #fef300;
  font-weight: 600;
}

.role-option.current:hover {
  background: rgba(254, 243, 0, 0.3);
}

/* Popup Actions */
.popup-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.popup-actions .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.popup-actions .btn-primary {
  background: #fef300;
  color: #000;
}

.popup-actions .btn-primary:hover {
  background: #e6d600;
  transform: translateY(-1px);
}

.popup-cancel-link {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.popup-cancel-link:hover {
  opacity: 0.7;
  text-decoration: none;
  color: #FFFFFF;
}

/* Popup Close X */
.popup-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.popup-close-x:hover {
  opacity: 0.7;
}

.profile-name {
  margin: 6px 0;
  text-align: center;
}

.role-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translate(25%, 25%);
  background: var(--accent);
  color: #000;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-caption {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
}

/* Level Progress */
.level-container {
  margin-top: 16px;
  width: 100%;
  max-width: 300px;
}

.level-bar-container {
    display: flex;
}

.level-label {
  color: #fef300;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 0 8px 0 0;
  text-wrap: nowrap
}

.level-bar {
  width: 100%;
  height: 12px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin: 2px 0 6px;
}

.level-progress {
  height: 100%;
  background-color: #fef300;
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* Role specific styling */
.level-label-jap {
  color: #387DDE !important;
}

.level-progress-jap {
  background-color: #387DDE !important;
}

.level-label-player {
  color: #fef300 !important;
}

.level-progress-player {
  background-color: #fef300 !important;
}

.level-label-coach {
  color: #E6672B !important;
}

.level-progress-coach {
  background-color: #E6672B !important;
}

.level-xp-text {
  text-align: right;
  font-size: 12px;
  color: #CCCCCC;
  font-weight: 500;
}

/* Player Stats */
.player-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  width: 100%;
  max-width: 300px;
}

.player-stat {
  background-color: rgba(0,0,0,.3);
  border-radius: 12px;
  padding: 12px 20px;
  text-align: center;
  min-width: 90px;
  flex: 1;
}

.player-stat-label {
  color: #FFFFFF;
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.player-stat-value {
  color: #FFFFFF;
  font-size: 20px;
  font-weight: bold;
}

/* Profile Sections */
.profile-section {
  margin-top: 24px;
  width: 100%;
  max-width: 300px;
}

.profile-action {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 50px 0 20px;
  width: 100%;
  max-width: 300px;
}

.wallet-button {
  background-color: #fef300;
  color: #000000;
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: block;
  text-align: center;
  width: 100%;
  margin-bottom: 10px
}

.wallet-button:hover {
  background-color: #e6d600;
}

.logout-button {
  background-color: #dc2626;
  color: #FFFFFF;
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: block;
  text-align: center;
  width: 100%;
}

.logout-button:hover {
  background-color: #b91c1c;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  color: #fef300;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 0;
}

.section-link {
  color: #fef300;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.section-link:hover {
  opacity: 0.8;
}

.empty-state {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  padding: 16px 0;
}

/* Badges */
.badge-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.badge-item:hover {
  transform: scale(1.05);
}

.badge-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
}

.badge-label {
  color: #FFFFFF;
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
  max-width: 80px;
  line-height: 1.2;
}

/* Challenge Card */
.challenge-card {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
  gap: 12px;
}

.challenge-card:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

.challenge-content {
  flex: 1;
}

.challenge-title {
  color: #FFFFFF;
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-xp {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #fef300;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* Fantasy Intro */
.fantasy-intro-text {
  text-align: center;
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Popup Modal */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.popup-content {
  background-color: #111827;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  transition: color 0.2s;
}

.popup-close:hover {
  color: #FFFFFF;
}

.popup-badge-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
}

.popup-title {
  color: #fef300;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.popup-description {
  color: #e2e8f0;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.popup-xp {
  color: #fef300;
  font-size: 18px;
  font-weight: 700;
  margin-top: 16px;
}

/* Error Page (404) */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 24px;
}

.error-title {
  color: #fef300;
  font-size: 120px;
  font-weight: 700;
  margin: 0 0 24px 0;
  line-height: 1;
}

.error-message {
  color: #FFFFFF;
  font-size: 18px;
  margin: 0 0 32px 0;
  max-width: 500px;
}

.error-button {
  background-color: #fef300;
  color: #0E0F12;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.error-button:hover {
  background-color: #fff44d;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(254, 243, 0, 0.3);
}

.error-button:active {
  transform: translateY(0);
}

/* Ratings Card */
.ratings-card {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
}

.ratings-card:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

.ratings-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ratings-stars {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.ratings-stars .material-symbols-rounded {
  font-size: 28px;
}

.ratings-stars .star-filled {
  color: #fef300;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ratings-stars .star-half {
  color: #fef300;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ratings-stars .star-empty {
  color: #777777;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ratings-average {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
}

.ratings-count {
  color: #94a3b8;
  font-size: 12px;
}

/* Popup List for Ratings */
.popup-wide {
  max-width: 500px;
}

.popup-empty {
  color: #94a3b8;
  font-size: 14px;
  margin: 16px 0;
}

.popup-list {
  max-height: 400px;
  overflow-y: auto;
  text-align: left;
  margin-top: 16px;
}

.rating-item {
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 12px;
}

.rating-item:last-child {
  margin-bottom: 0;
}

.rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.rating-player {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
}

.rating-player-link {
  color: #fef300;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.rating-player-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.rating-stars-small {
  display: flex;
  gap: 2px;
}

.rating-stars-small .material-symbols-rounded {
  font-size: 16px;
}

.rating-stars-small .star-filled-small {
  color: #fef300;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.rating-stars-small .star-half-small {
  color: #fef300;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.rating-stars-small .star-empty-small {
  color: #777777;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.rating-date {
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 8px;
}

.rating-message {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

/* Tournament Form Styles */
.tournament-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 20px 0;
    width: 300px
}

.tournament-form-card {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
}

.tournament-form-title {
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 24px 0;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  color: #cccccc;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  background-color: #1D1F28;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px;
  color: #FFFFFF;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #fef300;
}

.form-input-clickable {
  cursor: pointer;
  user-select: none;
}

.form-input-clickable:hover {
  background-color: #232530;
}

.form-input-static {
  background-color: #1D1F28;
  color: #94a3b8;
  cursor: not-allowed;
}

.form-select {
  width: 100%;
  background-color: #1D1F28;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px;
  color: #FFFFFF;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-select:focus {
  outline: none;
  border-color: #fef300;
}

.tournament-submit-btn {
  width: 100%;
  background-color: #fef300;
  color: #003f68;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 24px;
}

/* Category Tag Display */
.category-tag {
  display: inline-block;
  background-color: #fef300;
  color: #003f68;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
}

/* Category Selection Popup */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.category-option {
  background-color: rgba(0, 0, 0, 0.2);
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-option:hover {
  border-color: #fef300;
  background-color: rgba(254, 243, 0, 0.1);
}

/* Format Selection Popup */
.format-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.format-option {
  background-color: rgba(0, 0, 0, 0.2);
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-option:hover {
  border-color: #fef300;
  background-color: rgba(254, 243, 0, 0.1);
}

/* Teams Selection Popup */
.teams-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.teams-option {
  background-color: rgba(0, 0, 0, 0.2);
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.teams-option:hover {
  border-color: #fef300;
  background-color: rgba(254, 243, 0, 0.1);
}

.teams-custom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #334155;
}

.teams-custom .form-label {
  margin-bottom: 12px;
  font-size: 14px;
}

.teams-custom .form-input {
  margin-bottom: 0;
}

.teams-custom-btn {
  width: 100%;
  background-color: #fef300;
  color: #000000;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 12px;
}

.teams-custom-btn:hover {
  background-color: #fff44d;
}

.teams-custom-btn:active {
  background-color: #e5db00;
}

/* Lieu Selection Popup */
.popup-search {
  width: 100%;
  background-color: #1D1F28;
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 12px;
  color: #FFFFFF;
  font-size: 14px;
  margin: 16px 0;
}

.popup-search:focus {
  outline: none;
  border-color: #fef300;
}

.lieu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.lieu-option {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #FFFFFF;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lieu-option:hover {
  background-color: rgba(254, 243, 0, 0.1);
}

/* Calendar Styles */
.calendar-container {
  margin-top: 16px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-month-year {
  display: flex;
  gap: 6px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
}

.calendar-nav {
  background: none;
  border: none;
  color: #fef300;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.calendar-nav:hover {
  opacity: 0.7;
}

.calendar-nav .material-symbols-rounded {
  font-size: 24px;
}

.calendar-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-day-name {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-day:hover {
  background-color: rgba(254, 243, 0, 0.2);
}

.calendar-day-empty {
  background: none;
  cursor: default;
}

.calendar-day-empty:hover {
  background: none;
}

.calendar-day-today {
  background-color: #fef300;
  color: #000000;
  font-weight: 700;
}

.calendar-day-today:hover {
  background-color: #fff44d;
}

/* Footer Navigation */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #0A1023;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  z-index: 100;
  padding-right: 20px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #B0B0B0;
  text-decoration: none;
  font-size: 11px;
  transition: color 0.2s ease;
  padding: 8px 12px;
}

.nav-item .material-symbols-rounded {
  display: block;
  font-size: 26px;
  margin-bottom: 2px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.nav-item .nav-label {
  display: block;
  font-weight: 500;
}

.nav-item.active {
  color: #fef300;
}

.nav-item:hover {
  color: #fef300;
}

/* Add padding to body to prevent content from being hidden behind footer */
body {
  padding-bottom: 70px;
}

/* Login Card */
.login-card {
    background-color: rgba(0,0,0,.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.login-header p {
    color: #eee;
    font-size: 0.95rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #fff;
    border: unset;
    border-radius: 8px;
    color: var(--bg);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: #fef300;
    box-shadow: 0 0 0 3px rgba(254, 243, 0, 0.1);
}

input::placeholder {
    color: #555555;
}

/* Select styling for register form */
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #fff;
    border: unset;
    border-radius: 8px;
    color: var(--bg);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: #fef300;
    box-shadow: 0 0 0 3px rgba(254, 243, 0, 0.1);
}

/* Remember Me & Forgot Password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    accent-color: #fef300;
}

.checkbox-wrapper label {
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    color: #cccccc;
    cursor: pointer;
}

.forgot-password {
    color: #fef300;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.forgot-password:hover {
    opacity: 0.8;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #fef300;
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.submit-btn:hover {
    background-color: #fff44d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(254, 243, 0, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Sign Up Link */
.signup-link {
    text-align: center;
    color: #888888;
    font-size: 0.95rem;
}

.signup-link a {
    color: #fef300;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.signup-link a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 640px) {
    .header-title {
        font-size: 1.5rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.tool-card {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tool-card:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

.tool-card .tool-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: #fef300;
}

.tool-card .tool-title {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card .tool-description {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.tool-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tool-button {
  width: 100%;
  background-color: #fef300;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-top: auto;
}

.tool-button:hover {
  background-color: #fff44d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 243, 0, 0.3);
}

.tool-button .material-symbols-rounded {
  font-size: 18px;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* Share / Diffusion UI */
.share-broadcast-entry {
  margin-top: 24px;
  text-align: center;
}

.share-broadcast-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.4);
  color: #e2e8f0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-broadcast-btn:hover {
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.share-broadcast-hint {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 10px;
}

.record-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  animation: pulseRecord 1s ease-in-out infinite;
}

@keyframes pulseRecord {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

.share-access-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 12000;
}

.share-access-overlay--open {
  display: flex;
}

.share-access-card {
  width: 100%;
  max-width: 520px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.share-access-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 28px;
  transition: color 0.2s ease;
}

.share-access-close:hover {
  color: var(--accent);
}

.share-code-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.share-code-panel-inline {
  margin: 40px auto;
  max-width: 520px;
  padding: 32px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.share-code-panel-inline .share-code-head {
  justify-content: center;
  text-align: center;
}

.share-code-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.share-code-head .material-symbols-rounded {
  font-size: 32px;
  color: var(--accent);
}

.share-code-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.share-code-head p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.share-code-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.share-code-input {
  width: 54px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid #1f2937;
  background: #0b1220;
  color: #f8fafc;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  transition: border 0.2s, transform 0.2s;
}

.share-code-input:focus {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px rgba(254, 243, 0, 0.15);
}

.share-code-hint {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 0;
}

.share-code-error {
  min-height: 20px;
  text-align: center;
  color: #f87171;
  font-size: 0.9rem;
}

.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 13000;
}

.share-modal-overlay--open {
  display: flex;
}

.share-modal-card {
  width: 100%;
  max-width: 480px;
  background: #0f172a;
  border-radius: 24px;
  border: 1px solid #1f2937;
  padding: 32px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.share-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

.share-modal-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.share-modal-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.share-modal-head p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.share-modal-body {
  margin-top: 24px;
}

.share-modal-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.share-code-display {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-code-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 6px;
  background: rgba(254, 243, 0, 0.1);
  border: 1px solid rgba(254, 243, 0, 0.5);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  min-width: 180px;
}

.share-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  border: 1px solid #374151 !important;
}

.share-copy-btn .material-symbols-rounded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-copy-btn span[data-share-copy-label] {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.share-modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.share-broadcast-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.share-modal-qr-container {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
}

.share-modal-qr-container #share-qr-code {
  display: flex;
  justify-content: center;
  align-items: center;
}

.share-modal-qr-container #share-qr-code canvas,
.share-modal-qr-container #share-qr-code img {
  border-radius: 8px;
}

.share-modal-hint {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 8px;
}

.share-modal-feedback {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.share-modal-feedback[data-state="success"] {
  color: #22c55e;
}

.share-modal-feedback[data-state="error"] {
  color: #f87171;
}

@media (max-width: 640px) {
  .share-code-input {
    width: 46px;
    height: 56px;
  }
  
  .share-access-card,
  .share-code-panel-inline {
    padding: 24px;
  }
}
