/* ========================================
   Truco Uruguayo - Base Styles
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green-felt: #1a5c2a;
  --green-dark: #0d3318;
  --green-light: #2d8a47;
  --gold: #d4a843;
  --gold-light: #f0d68a;
  --gold-dark: #a17c2f;
  --card-white: #fefefe;
  --card-shadow: rgba(0,0,0,0.3);
  --team-a: #3498db;
  --team-b: #e74c3c;
  --bg-dark: #1a1a2e;
  --bg-darker: #0f0f1a;
  --text-light: #ecf0f1;
  --text-muted: #95a5a6;
  --success: #2ecc71;
  --danger: #e74c3c;
  --warning: #f39c12;
  --purple: #8e44ad;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  color: var(--gold);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a1a;
}

.btn-green {
  background: linear-gradient(135deg, var(--success), #27ae60);
  color: #fff;
}

.btn-red {
  background: linear-gradient(135deg, var(--danger), #c0392b);
  color: #fff;
}

.btn-orange {
  background: linear-gradient(135deg, var(--warning), #e67e22);
  color: #1a1a1a;
}

.btn-purple {
  background: linear-gradient(135deg, var(--purple), #7d3c98);
  color: #fff;
}

.btn-gray {
  background: #555;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.1rem;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-dark);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 450px;
  animation: slideUp 0.3s ease;
}

.modal h2 {
  color: var(--gold);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--gold);
}

.form-group select option {
  background: var(--bg-dark);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-waiting {
  background: rgba(46,204,113,0.2);
  color: var(--success);
}

.badge-playing {
  background: rgba(231,76,60,0.2);
  color: var(--danger);
}

.badge-countdown {
  background: rgba(243,156,18,0.2);
  color: var(--warning);
}

/* Toast / Notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-dark);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 14px 24px;
  z-index: 2000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 350px;
  visibility: hidden;
  pointer-events: none;
}

.toast.show {
  visibility: visible;
  pointer-events: auto;
}

.toast.show {
  transform: translateX(0);
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.avatar-lg {
  width: 60px;
  height: 60px;
}

.avatar-sm {
  width: 30px;
  height: 30px;
}

.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,20,10,0.8);
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--gold);
}

.avatar-sm.avatar-placeholder {
  font-size: 0.7rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(212,168,67,0.3);
  border-radius: 3px;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(212,168,67,0.3); }
  50% { box-shadow: 0 0 20px rgba(212,168,67,0.6); }
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(52,152,219,0.6); }
  100% { box-shadow: 0 0 0 12px rgba(52,152,219,0); }
}

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

@keyframes cardDeal {
  from { opacity: 0; transform: scale(0.5) rotate(10deg) translateY(-50px); }
  to { opacity: 1; transform: scale(1) rotate(0) translateY(0); }
}

@keyframes scoreChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: var(--gold); }
  100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
  html { font-size: 14px; }
}

@media (max-width: 480px) {
  html { font-size: 13px; }
}
