/**
 * Memon Patah - Clubs & Leagues Styles
 */

/* ========== CLUBS SCREEN ========== */
.clubs-content {
  padding: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.clubs-empty-state {
  text-align: center;
  padding: 40px 20px;
}

.clubs-empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.clubs-empty-state h3 {
  margin: 0 0 10px;
  color: white;
}

.clubs-empty-state p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}

.clubs-section {
  margin-bottom: 24px;
}

.clubs-section h3 {
  margin: 0 0 12px;
  color: white;
  font-size: 18px;
}

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

.section-header h3 {
  margin: 0;
}

.add-btn {
  background: #1a5f3f;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.add-btn:hover {
  background: #2d7d5b;
}

.clubs-list, .leagues-list, .tournaments-list, .sessions-list, .members-list, .activity-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-text, .error-text {
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.error-text {
  color: #ff6b6b;
}

.club-card, .league-card, .session-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.1s;
}

.club-card:hover, .league-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.club-avatar, .league-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a5f3f 0%, #2d7d5b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.club-avatar img, .league-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.avatar-input-group {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-input-group input[type="url"] {
  width: 100%;
}

.avatar-upload-divider {
  text-align: center;
  color: #888;
  font-size: 12px;
  padding: 2px 0;
}

.file-upload-btn {
  display: inline-block;
  background: #1a5f3f;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.file-upload-btn:hover {
  background: #2d7d5b;
}

.file-upload-status {
  font-size: 12px;
  color: #666;
}

.file-upload-status.uploading {
  color: #1a5f3f;
}

.file-upload-status.error {
  color: #dc3545;
}

.file-upload-status.success {
  color: #28a745;
}

.avatar-upload-row input[type="url"] {
  flex: 1;
  min-width: 0;
}

.avatar-preview {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a5f3f 0%, #2d7d5b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-card-info, .league-card-info {
  flex: 1;
  min-width: 0;
}

.club-card-info h4, .league-card-info h4 {
  margin: 0 0 4px;
  color: #333;
  font-size: 16px;
}

.club-meta, .league-meta {
  font-size: 12px;
  color: #888;
}

.league-dates {
  font-size: 11px;
  color: #666;
  display: block;
  margin-top: 4px;
}

.club-card-arrow, .league-card-arrow {
  font-size: 24px;
  color: #ccc;
}

.join-club-form {
  display: flex;
  gap: 10px;
}

.join-club-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.join-club-form input:focus {
  border-color: #1a5f3f;
  outline: none;
}

/* ========== CLUB DETAIL SCREEN ========== */
.club-detail-content {
  padding: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.club-info-card {
  background: linear-gradient(135deg, #1a5f3f 0%, #2d7d5b 100%);
  border-radius: 16px;
  padding: 20px;
  color: white;
  margin-bottom: 16px;
}

.club-stats-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: bold;
}

.stat-label {
  font-size: 12px;
  opacity: 0.8;
}

.club-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  padding: 10px;
  border-radius: 8px;
}

.club-code-row strong {
  font-family: monospace;
  letter-spacing: 2px;
  font-size: 18px;
}

.copy-btn, .share-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.copy-btn:hover, .share-btn:hover {
  background: rgba(255,255,255,0.3);
}

.header-action-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* ========== TABS ========== */
.club-tabs {
  display: flex;
  gap: 4px;
  background: #f0f0f0;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
}

.tab-btn.active {
  background: white;
  color: #1a5f3f;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========== MEMBERS ========== */
.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a5f3f 0%, #2d7d5b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.member-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}

.member-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.member-role {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.member-role.owner {
  background: #ffd700;
  color: #333;
}

.member-role.admin {
  background: #3b82f6;
  color: white;
}

.member-role.member {
  background: #e0e0e0;
  color: #666;
}

.unclaimed-badge {
  font-size: 10px;
  padding: 3px 6px;
  background: #f97316;
  color: white;
  border-radius: 4px;
}

.member-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.member-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.member-action-btn:hover {
  background: #e5e5e5;
}

.member-action-btn:active {
  transform: scale(0.95);
}

.share-claim-btn {
  background: #dcfce7;
}

.share-claim-btn:hover {
  background: #bbf7d0;
}

.delete-member-btn:hover {
  background: #fee2e2;
}

.toggle-admin-btn {
  background: #fef3c7;
}

.toggle-admin-btn:hover {
  background: #fde68a;
}

.toggle-admin-btn.is-admin {
  background: #dbeafe;
}

.toggle-admin-btn.is-admin:hover {
  background: #bfdbfe;
}

/* ========== CLUB CHAT ========== */
.club-chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 320px);
  min-height: 300px;
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
}

.club-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.club-chat-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  word-wrap: break-word;
}

.club-chat-message.incoming {
  background: white;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.club-chat-message.outgoing {
  background: #1a5f3f;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.club-chat-message .sender-name {
  font-size: 11px;
  font-weight: 600;
  color: #1a5f3f;
  margin-bottom: 3px;
  display: block;
}

.club-chat-message.outgoing .sender-name {
  color: rgba(255,255,255,0.8);
}

.club-chat-message .message-text {
  font-size: 14px;
  line-height: 1.4;
}

.club-chat-message .message-time {
  font-size: 10px;
  color: #888;
  margin-top: 4px;
  text-align: right;
}

.club-chat-message.outgoing .message-time {
  color: rgba(255,255,255,0.7);
}

.club-chat-input-area {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: white;
  border-top: 1px solid #e0e0e0;
}

.club-chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
}

.club-chat-input-area input:focus {
  border-color: #1a5f3f;
}

.club-chat-input-area .send-btn {
  background: #1a5f3f;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
}

.club-chat-input-area .send-btn:hover {
  background: #2d7d5b;
}

.club-chat-input-area .send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ========== ACTIVITY FEED ========== */
.activity-item {
  padding: 12px;
  background: white;
  border-left: 3px solid #1a5f3f;
  border-radius: 0 8px 8px 0;
}

.activity-desc {
  display: block;
  color: #333;
  margin-bottom: 4px;
}

.activity-time {
  font-size: 11px;
  color: #888;
}

/* ========== LEAGUE DETAIL SCREEN ========== */
.league-detail-content {
  padding: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.league-info-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.league-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.league-actions-main {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.league-actions-main .action-btn {
  flex: 1;
  min-width: 140px;
}

.league-actions-main .action-btn.large {
  padding: 18px 20px;
  font-size: 17px;
}

.league-actions-secondary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.league-actions-secondary .action-btn.small {
  flex: 1;
  min-width: 80px;
  padding: 10px 8px;
  font-size: 13px;
}

@media (max-width: 360px) {
  .league-actions-main .action-btn.large {
    padding: 14px 16px;
    font-size: 15px;
  }
  .league-actions-secondary .action-btn.small {
    padding: 8px 6px;
    font-size: 12px;
  }
}

.action-btn {
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-btn.primary {
  background: linear-gradient(135deg, #1a5f3f 0%, #2d7d5b 100%);
  color: white;
}

.action-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(26, 95, 63, 0.3);
}

.action-btn.secondary {
  background: #f0f0f0;
  color: #333;
}

.action-btn.secondary:hover {
  background: #e0e0e0;
}

.action-btn.full-width {
  width: 100%;
}

.sessions-section h3 {
  margin: 0 0 12px;
  color: #333;
}

.session-card {
  cursor: default;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-date {
  font-weight: 600;
  color: #333;
}

.session-venue {
  font-size: 13px;
  color: #666;
}

.session-games {
  font-size: 12px;
  color: #888;
}

.double-points-badge {
  background: #ffd700;
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

/* ========== LEAGUE TABLE SCREEN ========== */
.league-table-content {
  padding: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.league-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.league-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.league-table th,
.league-table td {
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  overflow: hidden;
}

.league-table thead th {
  background: #1a5f3f;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
}

/* Column 1: Rank # - narrow */
.league-table th:nth-child(1),
.league-table td:nth-child(1) {
  width: 8%;
  min-width: 28px;
  max-width: 34px;
  padding-left: 0;
  padding-right: 0;
}

/* Column 2: Player name - flexible with ellipsis */
.league-table th:nth-child(2),
.league-table td:nth-child(2) {
  width: 44%;
  text-align: left;
  padding-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columns 3-7: Stats - equal width */
.league-table th:nth-child(n+3),
.league-table td:nth-child(n+3) {
  width: calc((100% - 8% - 44%) / 5);
  min-width: 32px;
  max-width: 44px;
}

.league-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

/* Mobile adjustments */
@media (max-width: 420px) {
  .league-table th,
  .league-table td {
    padding: 6px 3px;
    font-size: 10px;
  }
  .league-table th:nth-child(1),
  .league-table td:nth-child(1) {
    min-width: 24px;
    max-width: 30px;
  }
  .league-table th:nth-child(n+3),
  .league-table td:nth-child(n+3) {
    min-width: 28px;
    max-width: 38px;
  }
}

/* Force table display for rows within league-table (override any .player-row flex styles) */
.league-table tr,
.league-table tr.player-row {
  display: table-row !important;
  gap: 0 !important;
}

.league-table td,
.league-table th {
  display: table-cell !important;
}

.league-table tr:hover {
  background: #f8f9fa;
  cursor: pointer;
}

.league-table td.positive {
  color: #22c55e;
  font-weight: 600;
}

.league-table td.negative {
  color: #ef4444;
  font-weight: 600;
}

/* ========== PLAYER DETAIL MODAL ========== */
.player-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.player-detail-modal .modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
}

.player-detail-modal .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.player-detail-modal h3 {
  margin: 0 0 20px;
  text-align: center;
  color: #333;
}

.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-box {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.stat-box .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #1a5f3f;
  display: block;
}

.stat-box .stat-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
}

/* ========== SESSION SCREEN ========== */
.session-content {
  padding: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.session-setup h3, .session-setup h4 {
  margin: 20px 0 12px;
  color: #333;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #1a5f3f;
  outline: none;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  display: block;
  color: #666;
  font-size: 12px;
  margin-top: 4px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.team-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.player-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  background: white;
}

.player-checkbox input {
  display: none;
}

.player-checkbox.selected {
  background: #1a5f3f;
  color: white;
  border-color: #1a5f3f;
}

.player-checkbox.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== SESSION GAME ========== */
.game-score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  margin-bottom: 16px;
}

.team-score {
  text-align: center;
  flex: 1;
}

.team-name {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.team-total {
  font-size: 48px;
  font-weight: bold;
  color: white;
}

.team-a-score .team-total {
  color: #3b82f6;
}

.team-b-score .team-total {
  color: #ef4444;
}

.vs-divider {
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  font-weight: bold;
}

.target-display {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ===== Round Entry Card (Compact Scorecard Style) ===== */
.round-entry-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
}

.round-header {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: #333;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

/* Teams Grid - 2 columns side by side */
.teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.team-column {
  background: white;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #e0e0e0;
}

.team-a-col {
  border-top: 3px solid #3b82f6;
}

.team-b-col {
  border-top: 3px solid #ef4444;
}

.team-col-header {
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.team-a-col .team-col-header {
  color: #3b82f6;
}

.team-b-col .team-col-header {
  color: #ef4444;
}

/* Players List - Vertical */
.players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-row .p-name {
  font-size: 11px;
  color: #555;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-row .p-sign {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  color: #1a5f3f;
  padding: 0;
  line-height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-row .p-sign.negative {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.player-row .p-score {
  width: 45px;
  height: 24px;
  padding: 2px 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

/* Team Subtotal */
.team-subtotal {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.mini-sign {
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  color: #1a5f3f;
  padding: 0;
  line-height: 18px;
}

.mini-sign.negative {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.subtotal-input {
  width: 45px;
  height: 24px;
  padding: 2px 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

/* Round Summary */
.round-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px;
  background: #e8f5e9;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}

.summary-label {
  color: #666;
}

.summary-a {
  color: #3b82f6;
}

.summary-b {
  color: #ef4444;
}

.summary-vs {
  color: #999;
}

/* Closed By Info */
.closed-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}

.closed-info .closed-label {
  color: #666;
  font-weight: 500;
}

.closed-selection {
  color: #1a5f3f;
  font-weight: 600;
}

.closed-selection.placeholder {
  color: #999;
  font-weight: normal;
  font-style: italic;
}

/* Clickable Player Names for Closed Selection */
.player-row .p-name {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.player-row .p-name:hover {
  background: rgba(26, 95, 63, 0.1);
}

.player-row .p-name.selected-closer {
  background: #1a5f3f;
  color: white;
}

/* No One Closed Button */
.no-closed-btn {
  width: 100%;
  padding: 6px 10px;
  border: 1px dashed #999;
  border-radius: 4px;
  background: white;
  color: #666;
  font-size: 11px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.2s;
}

.no-closed-btn:hover {
  border-color: #1a5f3f;
  color: #1a5f3f;
}

.no-closed-btn.selected {
  background: #1a5f3f;
  border-color: #1a5f3f;
  color: white;
  border-style: solid;
}

/* Round Notes Input */
.round-notes-wrapper {
  margin-bottom: 8px;
}

.round-notes-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  resize: none;
  min-height: 32px;
  box-sizing: border-box;
}

.round-notes-input::placeholder {
  color: #999;
  font-style: italic;
}

/* Validation Message */
.validation-msg {
  color: #ef4444;
  font-size: 12px;
  text-align: center;
  padding: 6px;
  background: #fef2f2;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* Edit Round Modal */
.edit-round-content {
  max-width: 380px;
  width: 95%;
}

.edit-teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.edit-team-column {
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
  padding: 8px;
}

.edit-team-column .team-header {
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: #1a5f3f;
  margin-bottom: 8px;
}

.edit-player-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.edit-player-row .ep-name {
  flex: 1;
  font-size: 11px;
  color: #555;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-player-row .ep-name:hover {
  background: rgba(26,95,63,0.15);
}

.edit-player-row .ep-name.selected-closer {
  background: rgba(26,95,63,0.25);
  color: #1a5f3f;
  font-weight: 600;
}

.edit-player-row .ep-sign {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  color: #22c55e;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.edit-player-row .ep-sign.negative {
  color: #ef4444;
}

.edit-player-row .ep-score {
  width: 44px;
  padding: 4px;
  font-size: 12px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.team-total-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #ddd;
  font-size: 12px;
  color: #666;
}

.team-total-row span {
  flex: 1;
}

.team-total-row input {
  width: 50px;
  padding: 4px;
  text-align: center;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #1a5f3f;
  font-weight: bold;
}

.edit-closed-section {
  margin-bottom: 12px;
  padding: 10px;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
}

.edit-closed-section label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.edit-closed-display {
  padding: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  color: #1a5f3f;
  text-align: center;
  margin-bottom: 8px;
}

.no-one-closed-btn.small {
  font-size: 11px;
  padding: 6px 10px;
  width: 100%;
}

.edit-notes-section {
  margin-bottom: 16px;
}

.edit-notes-section label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.edit-notes-section textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  resize: vertical;
  box-sizing: border-box;
}

.edit-round-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.edit-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edit-score-row label {
  font-size: 14px;
  font-weight: 500;
}

.score-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-input-group input {
  width: 80px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
}

/* Round items clickable */
.round-item {
  cursor: pointer;
  transition: background 0.2s;
  padding: 6px 10px;
  border-radius: 6px;
}

.round-item:hover {
  background: rgba(26, 95, 63, 0.1);
}

.round-item:active {
  background: rgba(26, 95, 63, 0.2);
}

/* Session card clickable */
.session-card {
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.session-card:hover {
  background: rgba(26, 95, 63, 0.08);
}

.session-card:active {
  transform: scale(0.98);
}

/* Session detail modal */
.session-detail-info {
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.detail-label {
  font-size: 13px;
  color: #666;
}

.detail-value {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.detail-input {
  flex: 1;
  max-width: 180px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  text-align: right;
}

.detail-input:focus {
  outline: none;
  border-color: #1a5f3f;
}

.detail-row .toggle-switch.small {
  transform: scale(0.8);
}

.session-games-list {
  max-height: 400px;
  overflow-y: auto;
}

.session-game-item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  border: 1px solid #e0e0e0;
}

.session-game-item .game-number {
  color: #666;
}

.session-game-item .game-score {
  font-weight: 600;
  color: #1a5f3f;
}

.session-game-item .game-winner {
  color: #888;
  font-size: 11px;
}

/* Danger button */
.action-btn.danger {
  background: #ef4444;
  color: white;
}

.action-btn.danger:hover {
  background: #dc2626;
}

/* Closed By Row */
.closed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: white;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #e8e8e8;
  flex-wrap: wrap;
}

.closed-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.closed-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.closed-option {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #555;
  cursor: pointer;
}

.closed-option input {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #1a5f3f;
}

.closed-option.selected {
  color: #1a5f3f;
  font-weight: 600;
}

.deck-option {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #666;
  cursor: pointer;
  padding-left: 8px;
  border-left: 1px solid #ddd;
}

.deck-option input {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #888;
}

/* Legacy styles kept for backward compatibility */
.closed-by-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.deck-finished-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-top: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  border-top: 1px solid #e0e0e0;
}

.deck-finished-option input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.rounds-history h4 {
  margin: 0 0 12px;
  color: #333;
}

.rounds-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.round-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.round-num {
  font-size: 11px;
  color: #888;
}

.round-scores {
  font-weight: 600;
  color: #333;
}

/* ========== GAME END MODAL ========== */
.game-end-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.game-end-modal .modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  color: white;
}

.game-end-modal h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.winner-announcement {
  font-size: 24px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 24px;
}

.final-scores {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
}

.final-score {
  text-align: center;
}

.final-score .team-name {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.final-score .score {
  font-size: 36px;
  font-weight: bold;
}

.delta-summary {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========== MODAL OVERLAYS ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-overlay .modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay h3 {
  margin: 0 0 16px;
  color: #333;
}

.modal-desc {
  color: #666;
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .action-btn {
  flex: 1;
}

/* ========== HOME BUTTON STYLE ========== */
.home-menu-btn.clubs-action {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: white;
}

.home-menu-btn.clubs-action:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
  text-align: center;
  padding: 20px;
  color: #888;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #1a5f3f;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}
