/* Conway's Game of Life Component Styles */
/* Following AzpcIntranet coding standards - CSS in separate files */

.game-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 200px);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.game-canvas {
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    cursor: crosshair;
    transition: all 0.3s ease;
    display: block;
    width: 100%;            /* Stretch to fill container width */
    height: auto;           /* Keep aspect ratio; actual drawing uses intrinsic height */
    max-width: 100%;        /* Prevent overflow */
}

.game-canvas:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.game-canvas.pattern-mode {
    cursor: copy;
    border-color: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.control-panel {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.stats-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: transform 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
}

.pattern-btn {
    transition: all 0.2s ease;
    position: relative;
}

.pattern-btn:hover {
    transform: scale(1.05);
}

.pattern-btn.active {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.pattern-btn.active::after {
    content: "?";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffc107;
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.generation-indicator {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
}

.control-section {
    border-left: 4px solid #007bff;
    padding-left: 15px;
    margin-bottom: 15px;
}

.control-section.pattern-section {
    border-left-color: #28a745;
}

.theme-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin: 0 3px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-btn:hover, .theme-btn.active {
    transform: scale(1.2);
    border-color: #000;
}

.canvas-container {
    overflow: auto;
    max-height: 600px;
    border-radius: 8px;
}

.mode-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.effects-controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .control-panel {
        margin-top: 20px;
    }
    .game-container {
        padding: 10px;
    }
}