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

/* ==============================
   Gin Rummy 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 */
.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;
}

.player-score {
    text-align: center;
    flex: 1;
}

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

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

.deadwood {
    font-size: 12px;
    color: #ccc;
    margin-top: 0.25rem;
}

.game-info {
    text-align: center;
    flex: 1;
}

.round-display, .turn-display {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    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: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Player Areas */
.computer-area, .player-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-info {
    margin-bottom: 1rem;
}

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

.computer-hand, .player-hand {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 120px;
}

/* Center Area */
.center-area {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: center;
    margin: 2rem 0;
}

.discard-pile, .stock-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);
}

/* Enhanced Card Styling */
.card {
    width: 70px;
    height: 105px;
    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);
}

/* 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 24px;
    border-radius: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.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;
}

/* Meld Display */
.meld-display {
    background: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.meld-display h3 {
    color: white;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 2rem;
}

.meld-area {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 400px;
}

.meld-group {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 140px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.meld-group.valid {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

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

/* 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;
}

.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: 768px) {
    .score-board {
        flex-direction: column;
        gap: 1rem;
    }
    
    .center-area {
        gap: 2rem;
    }
    
    .game-controls {
        gap: 0.5rem;
    }
    
    .control-btn {
        padding: 10px 16px;
        font-size: 8px;
    }
    
    .card {
        width: 60px;
        height: 90px;
    }
    
    .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 cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

.card.flipping {
    animation: cardFlip 0.6s ease-in-out;
}

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

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

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

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

.gin-rummy-guide p, .gin-rummy-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;
}
