/* Strands Game Styles */
#strands-game-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#strands-game {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Game Header */
#game-header {
    text-align: center;
    margin-bottom: 30px;
}

#game-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #2c3e50;
}

#game-theme {
    margin-bottom: 15px;
}

.theme-label {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#theme-box {
    background: #007cba;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    min-width: 200px;
}

#progress {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

/* Game Grid */
#game-grid {
    display: grid;
    gap: 2px;
    /*background: #ddd;*/
    padding: 2px;
    border-radius: 8px;
    margin: 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

#strands-game .grid-cell {
    background: white;
    border: 2px solid transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    min-height: 50px;
    color: #2c3e50;
        width: auto;
    height: auto;
}

#strands-game .grid-cell:hover {
    background: #e8f4f8;
    border-color: #007cba;
}

#strands-game .grid-cell.selected {
    background: #007cba;
    color: white;
    border-color: #005a87;
    transform: scale(1.05);
}

#strands-game .grid-cell.found {
    background: #28a745;
    color: white;
    border-color: #1e7e34;
}
/*#strands-game .grid-cell.found::before {
  content: '';
  position: absolute;
  top: -20px;  adjust as needed 
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
    height: 20px;
    background: #28a745;
}*/

/* connector line below */
/*#strands-game .grid-cell.found::after {
  content: '';
  position: absolute;
  bottom: -20px;  adjust as needed 
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
    height: 20px;
    background: #28a745;
}*/

/* Remove top connector for the first selected */
/*#strands-game .grid-cell.found.first::before {
  display: none;
}*/

/* Remove bottom connector for the last selected */
/*#strands-game .grid-cell.found.last::after {
  display: none;
}*/
#strands-game .grid-cell.spangram {
    background: #ffc107;
    color: #212529;
    border-color: #d39e00;
    animation: pulse 1s infinite;
}

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

/* Game Controls */
#game-controls {
    text-align: center;
    margin: 20px 0;
}

.game-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.game-button:hover {
    background: #005a87;
}

.game-button:active {
    transform: translateY(1px);
}

/* Found Words */
#found-words {
    margin-top: 30px;
}

#found-words h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#found-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.found-word {
    background: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Game Messages */
#game-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
}

.game-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

.game-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.game-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.game-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.game-message.hint {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    #strands-game-container {
        padding: 10px;
    }
    
    #game-grid {
        max-width: 300px;
        /*gap: 1px;*/
        padding: 1px;
    }
    
    #strands-game .grid-cell {
        min-height: 40px;
        font-size: 1em;
    }
    
    #game-title {
        font-size: 1.5em;
    }
    
    .game-button {
        padding: 8px 16px;
        font-size: 0.8em;
        margin: 2px;
    }
    
    #game-messages {
        position: static;
        max-width: none;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    #game-grid {
        max-width: 250px;
    }
    
    #strands-game .grid-cell {
        min-height: 35px;
        font-size: 0.9em;
    }
    
    #theme-box {
        min-width: 150px;
        padding: 8px 15px;
    }
}