/* VegaNordlas Demo Grid Styles - Nordic Eco Fantasy */

.demo-grid-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    background: rgba(45, 90, 61, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(125, 216, 125, 0.2);
}

.demo-grid-title {
    font-size: 1.5rem;
    color: #f0f9f0;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.demo-grid-description {
    color: #c7d2cc;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(3, 60px);
    gap: 6px;
    justify-content: center;
    margin: 20px auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 12px;
    padding: 10px;
    background: rgba(45, 90, 61, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(125, 216, 125, 0.15);
    max-width: fit-content;
}

.symbol-grid:hover {
    transform: scale(1.02);
    background: rgba(45, 90, 61, 0.2);
    border-color: rgba(125, 216, 125, 0.3);
}

.symbol-grid:focus {
    outline: 2px solid #7dd87d;
    outline-offset: 2px;
}

.symbol-grid div {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(125, 216, 125, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    border: 1px solid rgba(125, 216, 125, 0.2);
    color: #f0f9f0;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.symbol-grid div::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(125, 216, 125, 0.3), transparent);
    transition: left 0.5s ease;
}

.symbol-grid div:hover {
    background: rgba(125, 216, 125, 0.25);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(125, 216, 125, 0.4);
}

.symbol-grid div:hover::before {
    left: 100%;
}

/* Active state during demo */
.symbol-grid.demo-active {
    animation: ecoGridPulse 0.6s ease-in-out infinite alternate;
    cursor: not-allowed;
}

.symbol-grid.demo-active div {
    animation: natureCellFlicker 0.15s ease-in-out infinite;
}

@keyframes ecoGridPulse {
    from {
        box-shadow: 0 0 20px rgba(125, 216, 125, 0.4);
        border-color: rgba(125, 216, 125, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(74, 124, 89, 0.6);
        border-color: rgba(74, 124, 89, 0.5);
    }
}

@keyframes natureCellFlicker {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

/* Demo Status Active State */
.demo-status.active {
    color: #7dd87d;
    animation: ecoStatusPulse 1.2s ease-in-out infinite;
}

@keyframes ecoStatusPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Theme Variations */
.demo-grid-container.forest-theme .symbol-grid {
    background: rgba(45, 90, 61, 0.15);
    border-color: rgba(125, 216, 125, 0.25);
}

.demo-grid-container.forest-theme .symbol-grid div {
    background: rgba(45, 90, 61, 0.2);
    border-color: rgba(125, 216, 125, 0.25);
}

.demo-grid-container.earth-theme .symbol-grid {
    background: rgba(139, 111, 71, 0.15);
    border-color: rgba(196, 149, 108, 0.25);
}

.demo-grid-container.earth-theme .symbol-grid div {
    background: rgba(139, 111, 71, 0.2);
    border-color: rgba(196, 149, 108, 0.25);
}

.demo-grid-container.nature-theme .symbol-grid {
    background: rgba(74, 124, 89, 0.15);
    border-color: rgba(168, 230, 168, 0.25);
}

.demo-grid-container.nature-theme .symbol-grid div {
    background: rgba(74, 124, 89, 0.2);
    border-color: rgba(168, 230, 168, 0.25);
}

.demo-grid-container.eco-theme .symbol-grid {
    background: rgba(125, 216, 125, 0.1);
    border-color: rgba(125, 216, 125, 0.3);
}

.demo-grid-container.eco-theme .symbol-grid div {
    background: rgba(125, 216, 125, 0.15);
    border-color: rgba(125, 216, 125, 0.3);
}

.demo-status {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(45, 90, 61, 0.1);
    border-radius: 8px;
    text-align: center;
    color: #c7d2cc;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 1.5rem;
    border: 1px solid rgba(125, 216, 125, 0.15);
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .symbol-grid {
        grid-template-columns: repeat(3, 50px);
        grid-template-rows: repeat(3, 50px);
        gap: 4px;
    }
    
    .symbol-grid div {
        font-size: 24px;
    }
    
    .demo-grid-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .demo-grid-title {
        font-size: 1.3rem;
    }
    
    .demo-grid-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .symbol-grid {
        grid-template-columns: repeat(3, 45px);
        grid-template-rows: repeat(3, 45px);
        gap: 3px;
    }
    
    .symbol-grid div {
        font-size: 20px;
    }
    
    .demo-status {
        font-size: 0.85rem;
    }
    
    .demo-grid-container {
        padding: 1rem;
    }
    
    .demo-grid-title {
        font-size: 1.2rem;
    }
    
    .demo-grid-description {
        font-size: 0.85rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .symbol-grid,
    .symbol-grid div,
    .demo-status {
        animation: none !important;
        transition: none !important;
    }
    
    .symbol-grid.demo-active {
        animation: none !important;
    }
    
    .symbol-grid.demo-active div {
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .symbol-grid {
        border: 2px solid #7dd87d;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .symbol-grid div {
        border: 1px solid #7dd87d;
        background: rgba(125, 216, 125, 0.2);
        color: #ffffff;
    }
    
    .demo-status {
        color: #ffffff;
        font-weight: bold;
        border-color: #7dd87d;
    }
    
    .demo-grid-container {
        border-color: #7dd87d;
        background: rgba(0, 0, 0, 0.6);
    }
}
