/* Golf Game Specific Styles */

/* Override primary color for golf */
:root {
  --golf-primary: #4CAF50;
  --golf-hover: #5DC264;
  --golf-secondary: #66BB6A;
  --golf-light: #81C784;
  --golf-dark: #388E3C;
}

/* Game Container - Full Width Layout */
.game-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: calc(100vh - 200px);
}

/* Game Header */
.game-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.game-icon {
  width: 40px;
  height: 40px;
  margin-right: 12px;
}

.game-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
}

/* Game content styling */
.game-container main {
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-dark) 100%);
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 2px solid var(--golf-primary);
    padding: 40px;
    position: relative;
    overflow: hidden;
    color: var(--off-white);
}

h1 {
    text-align: center;
    color: var(--off-white);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    font-size: 36px;
    font-family: 'Oswald', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    border-bottom: 2px solid var(--golf-primary);
    padding-bottom: 15px;
    position: relative;
}

.input-container {
    margin-bottom: 30px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid var(--golf-primary);
    border-radius: 12px;
    background-color: rgba(255,255,255,0.95);
    color: #333;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--golf-primary);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.3);
}

input[type="text"]::placeholder {
    color: #757575;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--light-gray);
    border-radius: 0 0 12px 12px;
    background-color: white;
    z-index: 10;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    margin-top: 5px;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    color: #333;
    transition: background-color 0.2s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: var(--off-white);
}

.autocomplete-image {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 1px solid var(--light-gray);
}

.autocomplete-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guess-grid {
    display: grid;
    gap: 20px;
    margin-top: 25px;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.guess-card {
    background: #121821;
    border-radius: 18px;
    margin-bottom: 24px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 2px 12px #0003;
    border-top: 5px solid var(--golf-primary);
}

.guess-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.guess-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.guess-player-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 16px;
    border: 2px solid #333;
}

.guess-player-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.guess-card-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.guess-card-details.custom-grid {
  display: grid;
  grid-template-areas:
    "nationality turned_pro highest_ranking"
    "pga_wins eu_wins major_wins";
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px 18px;
  width: 100%;
  margin-top: 8px;
}

.detail-area {
  margin: 0;
  padding: 0;
}

.detail-area.nationality .detail-item,
.detail-area.turned_pro .detail-item,
.detail-area.highest_ranking .detail-item,
.detail-area.pga_wins .detail-item,
.detail-area.eu_wins .detail-item,
.detail-area.major_wins .detail-item {
  height: 100%;
  min-height: 60px;
  justify-content: center;
}

.detail-item {
  background: #232323;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--mid-gray);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin: 0;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.detail-item.correct {
  background: #2e7d32;
  color: #fff;
}

.detail-item.number-clue {
  background: #bfae2e;
  color: #fff;
}

.detail-label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 2px;
}

.detail-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.arrow {
  font-size: 1.1rem;
  margin-left: 2px;
}

.flag-container {
    width: 35px;
    height: 25px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fi {
    font-size: 3em;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.fi span,
.fi svg {
    width: 150% !important;
    height: 150% !important;
    max-width: 150%;
    max-height: 150%;
    display: block;
}

.game-result {
    text-align: center;
    font-weight: bold;
    margin-bottom: 25px;
    padding: 18px;
    border-radius: 12px;
    animation: fadeIn 0.5s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: var(--primary-light);
    color: var(--white);
}

.game-result.success {
    background: #2e7d32;
}

.game-result.failure {
    background: #C62828;
    color: var(--white);
}

/* Popup Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 24, 33, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Popup Modal */
.popup-content {
  background: var(--primary-dark);
  color: var(--off-white);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  padding: 36px 32px 28px 32px;
  max-width: 480px;
  width: 95vw;
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s;
  border: 2px solid var(--golf-primary);
}

.popup-content img {
  width: 140px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 18px;
  border: 2px solid var(--golf-primary);
  background: var(--light-gray);
}

.popup-content h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 2em;
  color: var(--golf-primary);
  font-family: 'Oswald', sans-serif;
  letter-spacing: 1px;
}

.popup-content .close-button {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.7em;
  color: var(--off-white);
  cursor: pointer;
}

.popup-content .player-name {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--off-white);
}

.popup-content .stats {
  margin: 18px 0 12px 0;
  text-align: center;
  background: var(--primary-medium);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 1.2em;
}

.popup-content .stats h3 {
  margin: 0 0 8px 0;
  font-size: 1.4em;
  color: var(--golf-primary);
}

.popup-content .stats p {
  margin: 2px 0;
}

.popup-content .share-button {
  margin: 12px 0 0 0;
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  background: var(--golf-primary);
  color: var(--white);
  font-weight: 700;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 1px;
}

.popup-content .share-button:hover {
  background: var(--golf-hover);
}

/* Share Icons */
.share-icons {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  justify-content: center;
}

.share-icon-btn {
  background: var(--primary-dark, #1a2332) !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.share-icon-btn img,
.share-icon-btn svg {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 50% !important;
  width: 32px;
  height: 32px;
  filter: none !important;
  padding: 0 !important;
}

/* More Games Section */
.more-games-wrapper {
  margin-top: 20px;
}

.more-games-title {
  font-weight: bold;
  text-align: center;
  font-size: 1.2rem;
}

.game-card-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 24px;
  flex-wrap: nowrap;
}

/* Mini Game Cards */
.game-card-mini {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.game-card-mini .game-info {
  padding: 16px;
}

.game-card-mini .game-icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  display: inline-block;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
}

.game-card-mini h3 {
  margin: 8px 0;
  font-size: 1.1rem;
}

.game-card-mini .cta-button {
  margin-top: 10px;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  background-color: var(--golf-primary);
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

.game-card-mini .cta-button:hover {
  background-color: var(--golf-hover);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ============================================ */

/* Large screens and tablets (landscape) */
@media (max-width: 1200px) {
    .game-container {
        margin: 30px auto 0 auto;
        padding: 30px 30px;
    }
    
    h1 {
        font-size: 32px;
        margin-bottom: 25px;
    }
    
    .guess-card-details {
        gap: 10px;
    }
    
    .guess-card-details.custom-grid {
        gap: 15px 15px;
    }
}

/* Tablets (portrait) and small laptops */
@media (max-width: 1024px) {
    .game-container {
        margin: 20px auto 0 auto;
        padding: 25px 20px;
        max-width: calc(100% - 20px);
    }
    
    h1 {
        font-size: 28px;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }
    
    .guess-card {
        padding: 15px 18px;
        margin-bottom: 20px;
    }
    
    .guess-card-details.custom-grid {
        grid-template-areas:
            "nationality turned_pro highest_ranking"
            "pga_wins eu_wins major_wins";
        grid-template-columns: 1fr 1fr 1fr;
        gap: 18px;
    }
    
    .popup-content {
        padding: 28px 24px 20px 24px;
        width: 90vw;
    }
    
    .popup-content img {
        width: 120px;
        height: 170px;
    }
}

/* Mobile devices (large) */
@media (max-width: 768px) {
    .game-container {
        margin: 15px auto 0 auto;
        padding: 20px 15px;
        border-radius: 12px;
        max-width: calc(100% - 10px);
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 18px;
        letter-spacing: 1px;
    }
    
    input[type="text"] {
        padding: 12px;
        font-size: 16px;
    }
    
    .guess-card {
        padding: 12px 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .guess-card-header {
        margin-bottom: 10px;
    }
    
    .guess-player-image {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }
    
    .guess-player-name {
        font-size: 1.1rem;
    }
    
    .guess-card-details.custom-grid {
        grid-template-areas:
            "nationality turned_pro"
            "highest_ranking pga_wins"
            "eu_wins major_wins";
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .detail-item {
        padding: 8px 6px;
        min-height: 50px;
    }
    
    .detail-label {
        font-size: 0.75rem;
    }
    
    .detail-value {
        font-size: 0.9rem;
    }
    
    /* More Games Section */
    .game-card-row {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .game-card-mini {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }
    
    .game-card-mini .game-icon img {
        width: 40px;
        height: 40px;
    }
    
    .game-card-mini h3 {
        font-size: 1rem;
    }
    
    /* Popup adjustments */
    .popup-content {
        padding: 24px 20px 18px 20px;
        width: 92vw;
        max-width: 400px;
    }
    
    .popup-content img {
        width: 100px;
        height: 140px;
        margin-bottom: 15px;
    }
    
    .popup-content h2 {
        font-size: 1.6em;
        margin-bottom: 8px;
    }
    
    .popup-content .player-name {
        font-size: 1.1em;
    }
    
    .popup-content .stats {
        padding: 12px 15px;
        font-size: 1.1em;
    }
    
    .popup-content .stats h3 {
        font-size: 1.2em;
    }
}

/* Mobile devices (small) */
@media (max-width: 480px) {
    .game-container {
        margin: 5px auto 0 auto;
        padding: 12px 8px;
        max-width: calc(100% - 5px);
    }
    
    h1 {
        font-size: 18px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    input[type="text"] {
        padding: 8px;
        font-size: 16px;
    }
    
    .guess-card {
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    
    .guess-player-image {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }
    
    .guess-player-name {
        font-size: 0.95rem;
    }
    
    .guess-card-details.custom-grid {
        grid-template-areas:
            "nationality turned_pro"
            "highest_ranking pga_wins"
            "eu_wins major_wins";
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .detail-item {
        padding: 4px 3px;
        min-height: 35px;
    }
    
    .detail-label {
        font-size: 0.65rem;
        margin-bottom: 1px;
    }
    
    .detail-value {
        font-size: 0.8rem;
    }
    
    /* More Games Section */
    .game-card-row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .game-card-mini {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }
    
    /* Popup adjustments */
    .popup-content {
        padding: 20px 15px 15px 15px;
        width: 95vw;
        max-width: 350px;
    }
    
    .popup-content img {
        width: 80px;
        height: 110px;
        margin-bottom: 12px;
    }
    
    .popup-content h2 {
        font-size: 1.4em;
        margin-bottom: 6px;
    }
    
    .popup-content .player-name {
        font-size: 1em;
    }
    
    .popup-content .stats {
        padding: 10px 12px;
        font-size: 1em;
        margin: 15px 0 10px 0;
    }
    
    .popup-content .stats h3 {
        font-size: 1.1em;
    }
    
    .popup-content .share-button {
        padding: 8px 20px;
        font-size: 1em;
    }
    
    .share-icons {
        gap: 12px;
        margin-top: 12px;
    }
    
    .share-icon-btn img {
        width: 28px;
        height: 28px;
    }
}
