html {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='12' fill='white' stroke='%23333' stroke-width='1'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23eee'/%3E%3Ccircle cx='20' cy='14' r='1.5' fill='%23eee'/%3E%3Ccircle cx='15' cy='20' r='1.5' fill='%23eee'/%3E%3C/svg%3E") 16 16, auto;
}
button:hover, a:hover, .golf-btn:hover {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M10 4v24' stroke='%23333' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M10 4l14 5-14 5' fill='%23e74c3c'/%3E%3C/svg%3E") 10 4, pointer !important;
}
/* This ensures particles don't block button clicks */
.grass-particle, .click-ripple {
    pointer-events: none !important;
}
img {
  max-width: 100%;
  height: auto;
}
summary {
  padding: 15px;
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
  list-style: none; /* Removes the default arrow in some browsers */
}

summary:hover {
  background-color: #e2e2e2;
}

.club-content {
  padding: 15px;
  border-left: 3px solid #4CAF50; /* Adds a nice green accent bar */
  margin-bottom: 20px;
}

/* Give your buttons a higher priority */
.interaction-area {
    position: relative;
    z-index: 5;
}

.golf-btn {
    position: relative;
    z-index: 10;
    cursor: pointer !important;
}
/* Ensure particles are visible and move correctly */
.grass-particle {
  position: fixed;
  width: 4px;
  height: 10px;
  background-color: #2e7d32; /* Masters Green */
  pointer-events: none;
  z-index: 99999 !important; /* Extremely high to stay on top */
  border-radius: 2px;
}
.click-ripple {
  position: fixed;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.7); /* White ripple for better contrast */
  border: 2px solid #2e7d32;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: ripple-animation 0.6s ease-out;
  z-index: 9999;
}

@keyframes ripple-animation {
  from { width: 0; height: 0; opacity: 1; }
  to { width: 100px; height: 100px; opacity: 0; }
}
/* Split-Screen Container */
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background-color: #f0f7f4; /* A light golf-green tint */
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 5px solid #2e7d32;
}
.header-text { flex: 2; } /* Gives the text more room */
.header-img-container { flex: 1; } /* Keeps the image at a nice size */
.header-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.header-img:hover {
    transform: scale(1.05); /* Subtle zoom when hovering */
}

/* Responsive fix: Stack them on top of each other on small screens */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        text-align: center;
    }
}
/* The Ripple Effect Container */
.click-ripple {
  position: fixed;
  width: 10px;
  height: 10px;
  background: rgba(46, 125, 50, 0.6); /* Golf Green Color */
  border-radius: 50%;
  pointer-events: none; /* Allows you to click through the ripple */
  transform: translate(-50%, -50%);
  animation: ripple-animation 0.6s linear;
  z-index: 9999;
}

/* The Blinking Red Dot */
.live-dot {
    height: 8px;
    width: 8px;
    background-color: red;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.badge-active {
    background-color: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #2e7d32 !important;
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.1);
}

.badge-legend {
    background-color: #fff9c4 !important;
    color: #f57f17 !important;
    border: 1px solid #f57f17 !important;
}
/* If the status includes 'Active', make it green */
tr:has(span:contains("Active")) .status-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #2e7d32;
}
/* The Green Glow for Active Players */
.badge-active {
    background-color: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #2e7d32 !important;
}

.badge-legend {
    background-color: #fff9c4 !important;
    color: #f57f17 !important;
    border: 1px solid #f57f17 !important;
}
// Add a blinking dot only if they are active
const liveDot = isActive ? '<span class="live-dot"></span> ' : '';

const row = `
    <tr>
        <td>${index + 1}</td>
        <td>${icon} ${liveDot}<strong>${player.name}</strong></td>
        <td>${player.majors}</td>
        <td><span class="status-badge ${badgeClass}">${player.status}</span></td>
    </tr>
`;
@keyframes activePulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}
@keyframes ripple-animation {
  from {
    width: 0px;
    height: 0px;
    opacity: 0.8;
  }
  to {
    width: 50px;
    height: 50px;
    opacity: 0;
  }
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f4f7f4;
}

h1, h2 {
    color: #1d4d2b; /* Classic Golf Green */
    border-bottom: 2px solid #1d4d2b;
    padding-bottom: 10px;
}

.club-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.club-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 250px;
  text-align: center;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.club-card:hover {
  transform: translateY(-5px); /* Adds a nice hover effect */
}

.club-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}
#legendTable {
    border-collapse: separate;
    border-spacing: 0 8px; /* Adds space between rows */
    width: 100%;
}

#legendTable th {
    background-color: #2e7d32; /* Masters Green */
    color: white;
    padding: 12px;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}

#legendTable tr {
    background-color: rgba(255, 255, 255, 0.9);
    transition: transform 0.2s, box-shadow 0.2s;
}

#legendTable tr:hover {
    transform: scale(1.01); /* Subtle "pop" effect */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: #f1f8e9;
}

#legendTable td {
    padding: 15px;
    border: none;
}

/* Style the Rank number to look like a badge */
#legendTable td:first-child {
    font-weight: bold;
    color: #2e7d32;
    border-radius: 8px 0 0 8px;
}

#legendTable td:last-child {
    border-radius: 0 8px 8px 0;
}
p3 {
  color: purple;
  font-size: 24px;
}
table, th, td {
  border: 1px solid black;
}
h3 {
  color: purple;
}
h4 {
  font-family: lucida handwriting;
}
dt {
  font
}
aside {
  height: 115%;  
  width: 175%;
  padding-left: 35px;
  margin-left: 35px;
  float: right;
  font-style: italic;
  background-color: lightgray;
}
.center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  border: 3px solid green;
  place-items: center;
  height: 100px;
  border: 3px solid green;
  background-color: lightgreen; 
}
.path-section {
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  background-color: #f4f4f4;
  border-left: 5px solid #2e7d32; /* A nice golf green color */
  animation: fadeIn 0.5s;
}

.birdie { background-color: #fff176 !important; font-weight: bold; } /* Yellow */
.eagle { background-color: #ffd54f !important; border: 2px solid gold !important; } /* Gold */
.bogey { background-color: #cfd8dc !important; } /* Grey */
.double-bogey { background-color: #ffab91 !important; } /* Light Red */
.par { background-color: #ffffff !important; } /* White */
.scorecard-area {
  margin: 30px auto;
  max-width: 800px;
  text-align: center;
}

#scorecard {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 2px solid #2e7d32;
}

#scorecard th, #scorecard td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

#scorecard th {
  background-color: #2e7d32;
  color: white;
}


.hole-score {
  width: 40px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
}

.total-col {
  font-weight: bold;
  background-color: #f0fdf4;
  color: #2e7d32;
  font-size: 1.2em;
}
#scorecardTable {
    border-collapse: separate;
    border-spacing: 5px;
}
#scorecardTable th {
    background-color: #2e7d32;
    color: white;
    border-radius: 5px;
}
#scorecardTable input {
    width: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}
.fa-crown {
    animation: crown-shine 3s infinite;
}

@keyframes crown-shine {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 gold); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 5px gold); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 gold); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
#welcomeBox {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9); /* Slightly more opaque for readability */
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  z-index: 10000;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

.close-btn:hover {
  color: #000;
}
.interaction-area {
  text-align: center;
  padding: 40px;
  background-color: #f0fdf4; /* Light mint background */
  border-radius: 15px;
  margin: 20px 0;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.golf-btn {
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  background-color: #2e7d32; /* Golf Green */
  color: white;
  border: none;
  border-radius: 8px;
  transition: background 0.3s;
}

.golf-btn:hover {
  background-color: #1b5e20;
}

/* The Pop-up Box */
.modal-box {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 1000;
  width: 90%;
  max-width: 400px;
}
#welcomeBox {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Ensure the Close button stays inside the box */
.close-x {
  float: right;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
/* Color Coding for Scores */
.score-eagle { background-color: #ffd700 !important; color: black; } /* Gold */
.score-birdie { background-color: #ffcccc !important; color: black; } /* Light Red */
.score-par { background-color: #ccffcc !important; color: black; }    /* Light Green */
.score-bogey { background-color: #e0e0e0 !important; color: black; }  /* Light Gray */
.score-double { background-color: #b3b3b3 !important; color: black; } /* Darker Gray */
/* This only triggers on mobile devices */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column; /* Stacks your "Legends" and "Pro" boxes vertically */
    text-align: center;
  }

  .golf-btn {
    width: 100%; /* Makes buttons big enough to tap easily with a thumb */
    font-size: 18px; /* Larger text for easier reading on small screens */
    margin-bottom: 10px;
  }

  table {
    font-size: 12px; /* Shrinks the leaderboard slightly so it doesn't overflow */
  }
}
/* Scorecard Table Styling */
table {
    width: 95%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

th {
    background-color: #1b5e20; /* Golf Green */
    color: white;
    padding: 12px;
    text-transform: uppercase;
    font-size: 14px;
}

td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

/* Make the 'Par' row stand out */
tr:nth-child(1) {
    background-color: #f1f8e9;
    font-weight: bold;
}

/* Highlight the Total column */
td:last-child, th:last-child {
    background-color: #fbc02d; /* Gold/Yellow */
    font-weight: bold;
}

/* Mobile responsive tweak */
@media (max-width: 600px) {
    table { font-size: 12px; }
    td, th { padding: 5px; }
}
@media print {
    /* Hide the Nav Bar and Buttons so they don't waste ink */
    nav, button, .no-print {
        display: none !important;
    }

    /* Center the scorecard on the paper */
    body {
        background: white;
        padding: 0;
    }

    table {
        width: 100%;
        border: 2px solid black;
    }
}