/* Game of Life Page Styles */

/* Hero Visual */
.gol-preview {
    background: var(--glassmorphism);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    display: block;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.preview-overlay {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: center;
}

.validator-count {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.validator-count .count {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.validator-count .label {
    color: #e2e8f0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Step Visuals */
.step-visual {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-caption {
    color: #a0aec0;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    font-family: 'Space Grotesk', monospace;
}

/* Mini Grids */
.mini-grid {
    display: inline-grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 8px;
}

.mini-cell {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.mini-cell.alive {
    background: #667eea;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.mini-cell.alive.center {
    background: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Rules Demo */
.rules-demo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rule-example {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 6px;
}

.rule-arrow {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: bold;
}

.rule-text {
    width: 100%;
    text-align: center;
    color: #e2e8f0;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Generation Sequence */
.generation-sequence {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gen-frame {
    text-align: center;
}

.gen-frame span {
    display: block;
    color: #a0aec0;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.gen-arrow {
    color: #667eea;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Selection Demo */
.selection-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.demo-grid {
    text-align: center;
}

.grid-label {
    color: #a0aec0;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.selection-arrow {
    color: #FFD700;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Witness Demo */
.witness-demo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.witness-item {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.witness-item.selected {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.witness-label {
    color: #a0aec0;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Featured Demo Section */
.demo-section-featured {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    padding: 4rem 0 5rem;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.demo-section-featured h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #fff;
}

.demo-section-featured .section-subtitle {
    text-align: center;
    color: #e2e8f0;
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* Demo Interface Enhancements */
.demo-interface {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.demo-controls {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.control-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
}

.control-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.control-group input[type="range"] {
    width: 100%;
    margin-top: 0.5rem;
    accent-color: #667eea;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.demo-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.demo-buttons button {
    flex: 1;
    min-width: 120px;
}

/* Canvas Container */
.canvas-and-validators {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: center;
}

.canvas-container {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#main-canvas {
    display: block;
    width: 540px;
    height: 540px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.canvas-overlay {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-display {
    display: flex;
    gap: 1.5rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-label {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-bottom: 0.25rem;
}

.status-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #667eea;
}

/* Validators Sidebar */
.validators-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.witnesses-panel,
.selection-results {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.witnesses-panel h3,
.selection-results h4 {
    color: #e2e8f0;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.witness-list,
.selected-validators {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.witness {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.witness.selected {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .canvas-and-validators {
        flex-direction: column;
        align-items: center;
    }
    
    .canvas-container {
        width: 100%;
        max-width: 100%;
    }
    
    #main-canvas {
        width: 100%;
        height: auto;
        max-width: 540px;
    }
    
    .validators-sidebar {
        width: 100%;
        max-width: 540px;
    }
    
    .control-row {
        grid-template-columns: 1fr;
    }
    
    .demo-buttons {
        flex-direction: column;
    }
    
    .demo-buttons button {
        min-width: auto;
    }
    
    .generation-sequence {
        gap: 0.5rem;
    }
    
    .selection-demo {
        gap: 1rem;
    }
}
