/* VIVA Pikado Liga 25/26 – Elegant Wood Theme */
:root {
  --bg: #faf8f5;
  --bg-elev: #f5f2ed;
  --text: #2c2419;
  --muted: #6b5d47;
  --brand: #8b4513;
  --brand-2: #d4af37;
  --accent: #cd853f;
  --danger: #b22222;
  --card: #ffffff;
  --border: #e6ddd4;
  --shadow: 0 4px 16px rgba(139, 69, 19, 0.15);
  --wood-light: #f4f1eb;
  --wood-medium: #d2c4b0;
  --wood-dark: #8b7355;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: 
    radial-gradient(1200px 800px at 10% 0%, rgba(212,175,55,.08), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(139,69,19,.06), transparent 55%),
    linear-gradient(135deg, var(--bg) 0%, var(--wood-light) 100%);
  color: var(--text);
  min-height: 100vh;
}

.container { width: min(1200px, 92%); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,245,.95);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { 
  width: 42px; 
  height: 42px; 
  border-radius: 10px; 
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); 
  display: grid; 
  place-items: center; 
  color: #ffffff; 
  font-weight: 800; 
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 16px; }
.brand-text span { font-size: 12px; color: var(--muted); }

.main-nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.main-nav a { 
  color: var(--text); 
  text-decoration: none; 
  padding: 8px 10px; 
  border-radius: 8px; 
  transition: all 0.3s ease;
}
.main-nav a:hover, .main-nav a.active { 
  background: var(--brand); 
  color: #ffffff; 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}
.nav-toggle { 
  display: none; 
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 60px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 0;
  transition: 0.3s;
}

.nav-toggle .menu-text {
  display: block;
  width: 24px;
  height: auto;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  transition: 0.3s;
}

.nav-toggle .menu-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  width: 24px;
  transition: 0.3s;
  display: block;
}

.nav-toggle span:nth-child(1) { transform-origin: 0% 0%; }
.nav-toggle span:nth-child(2) { transform-origin: 0% 50%; }

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(2px, 2px); }
.nav-toggle.active span:nth-child(2) { transform: rotate(-45deg) translate(2px, -2px); }
.nav-toggle.active .menu-text { opacity: 0; }

@media (max-width: 860px) {
  .nav-toggle { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 42px; 
    height: 42px; 
    background: var(--bg-elev); 
    border: 1px solid var(--border); 
    border-radius: 10px; 
    color: var(--text); 
  }
  .main-nav ul { 
    display: none; 
    position: absolute; 
    right: 4%; 
    top: 58px; 
    flex-direction: column; 
    background: var(--bg-elev); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 8px; 
    box-shadow: var(--shadow);
    min-width: 200px;
  }
  .main-nav[aria-expanded="true"] ul { display: flex; }
}

main.container { padding: 28px 0 40px; }

.view[hidden] { display: none !important; }

h1 { font-size: 28px; margin: 8px 0 18px; }
h3 { margin: 8px 0 8px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* Glavna stranica - novi card stil */
.card-grid .card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  padding: 24px; 
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 80px;
}

/* Ostale stranice - stari card stil */
.card:not(.card-grid .card) { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 14px; 
  padding: 16px; 
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hover efekti samo za glavnu stranicu */
.card-grid .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-grid .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139, 69, 19, 0.25);
  border-color: var(--brand);
}

.card-grid .card:hover::before {
  opacity: 1;
}

/* Ostale stranice - jednostavan hover */
.card:not(.card-grid .card):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.2);
}

/* Featured cards samo za glavnu stranicu */
.card-grid .card.featured {
  background: linear-gradient(135deg, var(--card) 0%, var(--wood-light) 100%);
  border: 2px solid var(--brand);
  animation: pulse 3s infinite;
}

.card-grid .card.featured::before {
  opacity: 1;
  height: 6px;
}

/* Card ikone i sadržaj samo za glavnu stranicu */
.card-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border-radius: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.card-grid .card:hover .card-icon {
  background: var(--brand);
  transform: scale(1.1);
}

.card-content h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.card-content p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  text-decoration: none;
}

.card.muted { color: var(--muted); }

.info.muted { color: var(--muted); }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
th { 
  color: #ffffff; 
  font-weight: 600; 
  background: linear-gradient(135deg, var(--brand), var(--wood-dark)); 
  position: sticky; 
  top: 0; 
}

.players-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .players-layout { grid-template-columns: 1fr; } }

.players-list { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.search-row { padding: 8px; }
input[type="search"], select, input, button { font: inherit; }
input[type="search"] { 
  width: 100%; 
  padding: 10px 12px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  background: var(--bg-elev); 
  color: var(--text);
  transition: border-color 0.3s ease;
}
input[type="search"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}
.list { margin: 8px 0 0; padding: 0; list-style: none; max-height: 520px; overflow: auto; }
.list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.list li:hover { background: var(--bg-elev); }

.player-detail { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; min-height: 280px; box-shadow: var(--shadow); }
.placeholder.muted { color: var(--muted); }

.chip { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  border: 1px solid var(--border); 
  background: var(--bg-elev); 
  color: var(--text); 
  padding: 6px 10px; 
  border-radius: 999px; 
  font-size: 12px;
  transition: all 0.3s ease;
}
.chip:hover {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-1px);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); }

@keyframes pulse {
  0% { 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(139, 69, 19, 0.4);
  }
  50% { 
    transform: scale(1.02); 
    box-shadow: 0 0 0 8px rgba(139, 69, 19, 0.1);
  }
  100% { 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(139, 69, 19, 0);
  }
}

/* Tournament Styles */
.featured-tournament {
  border: 2px solid var(--brand);
  background: linear-gradient(135deg, #fff 0%, #fefefe 100%);
  box-shadow: 0 8px 32px rgba(139, 69, 19, 0.2);
  animation: pulse 3s infinite;
  padding: 25px;
}

.tournament-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.tournament-image {
  flex-shrink: 0;
}

.tournament-image img {
  width: 400px;
  height: 400px;
  object-fit: contain;
  border-radius: 12px;
  border: 3px solid var(--brand);
  transition: transform 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 69, 19, 0.2);
  background: #fff;
}

.tournament-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(139, 69, 19, 0.3);
}

.tournament-title {
  flex: 1;
  min-width: 200px;
}

.tournament-title h3 {
  color: var(--brand);
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.2;
}

.tournament-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.tournament-info {
  background: rgba(139, 69, 19, 0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(139, 69, 19, 0.1);
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-text {
  line-height: 1.4;
}

.info-text strong {
  color: var(--brand);
  display: block;
  margin-bottom: 2px;
}

.contact-note {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.phone-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.phone-link:hover {
  color: var(--brand-2);
  border-bottom-color: var(--brand-2);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.prizes-section {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(139, 69, 19, 0.1);
}

.prizes-section h4 {
  margin: 0 0 15px 0;
  color: var(--brand);
  font-size: 1.2rem;
  text-align: center;
}

.prize-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prize-item {
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border-left: 4px solid var(--brand);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.prize-item.gold {
  border-left-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.8));
}

.prize-item.silver {
  border-left-color: #c0c0c0;
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(255, 255, 255, 0.8));
}

.prize-item.bronze {
  border-left-color: #cd7f32;
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(255, 255, 255, 0.8));
}

.prize-item:hover {
  background: rgba(139, 69, 19, 0.1);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.tournament-message {
  grid-column: 1 / -1;
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-radius: 12px;
  border-left: 4px solid var(--brand);
  position: relative;
  overflow: hidden;
}

.tournament-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 3s infinite;
}

.tournament-message p {
  margin: 0 0 10px 0;
  font-style: italic;
}

.tournament-message p:last-child {
  margin-bottom: 0;
  font-weight: 600;
  font-style: normal;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Responsive adjustments for tournament cards */
@media (max-width: 768px) {
  .featured-tournament {
    margin-bottom: 20px;
    padding: 20px;
  }
  
  .tournament-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .tournament-image img {
    width: 240px;
    height: 240px;
    object-fit: contain;
    background: #fff;
  }
  
  .tournament-title h3 {
    font-size: 1.5rem;
  }
  
  .tournament-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .tournament-info,
  .prizes-section {
    padding: 15px;
  }
  
  .info-section {
    gap: 12px;
  }
  
  .prize-list {
    gap: 8px;
  }
  
  .prize-item {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .tournament-message {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .featured-tournament {
    padding: 15px;
  }
  
  .tournament-image img {
    width: 240px;
    height: 240px;
    object-fit: contain;
    background: #fff;
  }
  
  .tournament-title h3 {
    font-size: 1.3rem;
  }
  
  .info-item {
    gap: 8px;
  }
  
  .info-icon {
    font-size: 1rem;
  }
}

/* Image Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  margin: 2% auto;
  padding: 0;
  width: 90%;
  max-width: 1000px;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoomIn 0.3s ease;
}

.modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #ffffff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.close:hover,
.close:focus {
  color: var(--brand-2);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

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

@keyframes zoomIn {
  from { 
    opacity: 0;
    transform: scale(0.8);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    height: 85%;
    margin: 5% auto;
  }
  
  .close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    height: 80%;
    margin: 10% auto;
  }
  
  .close {
    top: 5px;
    right: 15px;
    font-size: 25px;
  }
}



