/* ==============================
   Import Base Styles
   ============================== */
@import url('../yukon-solitaire/style.css');

/* ==============================
   500 Rum Specific Overrides
   ============================== */

/* Game Header */
.game-header {
    background: linear-gradient(135deg, #0a0a16 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.font-game, .font-press-start {
    font-family: 'Press Start 2P', cursive;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-btn.primary {
    background: #00ccff;
    border-color: #00ccff;
    color: #0a0a16;
    font-weight: bold;
}

/* Game Container */
.game-container {
    background: url('https://www.transparenttextures.com/patterns/asfalt-light.png') repeat, #228B22;
    background-size: 100px 100px;
    min-height: 100vh;
    padding: 20px;
}

/* Score Board - 5 players layout */
.score-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    color: white;
    flex-wrap: wrap;
    gap: 1rem;
}

.player-score {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.player-score h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    margin-bottom: 0.5rem;
    color: #00ccff;
}

.score-display {
    font-size: 20px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

.melds-count {
    font-size: 10px;
    color: #ccc;
    margin-top: 0.25rem;
}

.game-info {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.round-display, .turn-display {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    margin: 0.25rem 0;
}

/* Game Table */
.game-table {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 700px;
    position: relative;
    display: grid;
    grid-template-areas: 
        ". top ."
        "left center right"
        ". bottom .";
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
}

/* Computer Areas */
.computer-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.computer-area.top { grid-area: top; }
.computer-area.left { 
    grid-area: left; 
    align-items: flex-end;
}
.computer-area.right { 
    grid-area: right; 
    align-items: flex-start;
}

.player-area { 
    grid-area: bottom; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.center-area {
    grid-area: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

/* Player Info */
.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.player-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.cards-count {
    font-size: 8px;
    color: #ccc;
}

/* Hands */
.computer-hand, .player-hand {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 100px;
}

.computer-area.left .computer-hand {
    flex-direction: column;
    max-height: 300px;
    overflow-y: auto;
}

.computer-area.right .computer-hand {
    flex-direction: column;
    max-height: 300px;
    overflow-y: auto;
}

/* Melds Areas */
.melds-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 60px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.meld-group {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Meld Info Display */
.meld-info {
    font-size: 10px;
    color: #00ccff;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    margin-bottom: 5px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Piles */
.stock-pile, .discard-pile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.pile-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.card-pile {
    width: 80px;
    height: 120px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-pile:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

/* Spread Discard Pile */
.spread-pile {
    width: 200px;
    height: 140px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: hidden;
}

.spread-pile .card {
    position: absolute;
    width: 50px;
    height: 75px;
}

/* Card Styling */
.card {
    width: 60px;
    height: 90px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.card.selected {
    transform: translateY(-10px);
    border-color: #00ccff;
    box-shadow: 0 8px 15px rgba(0, 204, 255, 0.4);
}

.card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pile Count Display */
.pile-count {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(135deg, #0a0a16, #1a1a2e);
    color: white;
    border: 2px solid #00ccff;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    min-width: 120px;
}

.control-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    box-shadow: 0 4px 12px rgba(0, 204, 255, 0.3);
    transform: translateY(-2px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #00ccff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #00ccff;
}

/* Meld Creation Modal */
.meld-instructions {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #ccc;
}

.selected-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 1rem 0;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.meld-validation {
    text-align: center;
    margin: 1rem 0;
    font-size: 12px;
    min-height: 20px;
}

.meld-validation.valid {
    color: #28a745;
}

.meld-validation.invalid {
    color: #dc3545;
}

.meld-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Lay Off Modal */
.layoff-instructions {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #ccc;
}

.available-melds {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.meld-option {
    display: flex;
    gap: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.meld-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00ccff;
}

.meld-option.selected {
    border-color: #00ccff;
    background: rgba(0, 204, 255, 0.3);
    transform: scale(1.02);
}

.layoff-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Rules Modal */
.rules-content h2 {
    font-family: 'Press Start 2P', cursive;
    color: #00ccff;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 16px;
}

.rules-section h3 {
    font-family: 'Press Start 2P', cursive;
    color: #00ccff;
    margin: 1.5rem 0 1rem 0;
    font-size: 12px;
}

.rules-section p, .rules-section li {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.rules-section ul, .rules-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Game Messages */
.game-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid #00ccff;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    text-align: center;
    z-index: 1500;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-table {
        grid-template-areas: 
            "top top"
            "center center"
            "bottom bottom";
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .computer-area.left,
    .computer-area.right {
        grid-area: top;
    }
}

@media (max-width: 768px) {
    .score-board {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-table {
        padding: 1rem;
        min-height: 500px;
    }
    
    .game-controls {
        gap: 0.5rem;
    }
    
    .control-btn {
        padding: 10px 14px;
        font-size: 8px;
        min-width: 100px;
    }
    
    .card {
        width: 50px;
        height: 75px;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 1rem;
    }
}

/* Animations */
@keyframes cardDeal {
    from {
        opacity: 0;
        transform: translateY(-50px) rotateY(180deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateY(0deg);
    }
}

.card.dealing {
    animation: cardDeal 0.5s ease-out;
}

@keyframes meldSuccess {
    0% { background: rgba(40, 167, 69, 0.3); }
    50% { background: rgba(40, 167, 69, 0.6); }
    100% { background: rgba(40, 167, 69, 0.3); }
}

.meld-group.success {
    animation: meldSuccess 0.8s ease-in-out;
}

/* SEO Content Styling */
.seo-content {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: white;
}

.text-primary-color {
    color: #00ccff;
}

.rum-500-guide h3 {
    font-family: 'Press Start 2P', cursive;
}

.rum-500-guide h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
}

.rum-500-guide p, .rum-500-guide li {
    font-family: 'Roboto', sans-serif;
}

/* Settings Options */
.settings-options input[type="checkbox"] {
    accent-color: #00ccff;
}

.settings-options input[type="range"] {
    accent-color: #00ccff;
}

.settings-options select {
    background: #1a1a2e;
    color: white;
    border: 1px solid #00ccff;
}
