/* Math Adventure Game - WordPress Plugin Styles */

.math-adventure-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Fredoka', sans-serif;
}

.math-adventure-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.math-adventure-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.math-adventure-description {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.math-adventure-game-wrapper {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.math-adventure-iframe {
    width: 100%;
    border: none;
    border-radius: 15px;
    display: block;
    background: #f8f9fa;
}

.math-adventure-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.instruction-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid #667eea;
}

.instruction-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.instruction-item i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
    display: block;
}

.instruction-item span {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .math-adventure-container {
        padding: 10px;
    }
    
    .math-adventure-title {
        font-size: 2rem;
    }
    
    .math-adventure-description {
        font-size: 1rem;
    }
    
    .math-adventure-game-wrapper {
        padding: 15px;
    }
    
    .math-adventure-instructions {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .instruction-item {
        padding: 20px;
    }
    
    .instruction-item i {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .math-adventure-title {
        font-size: 1.5rem;
    }
    
    .math-adventure-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .instruction-item {
        padding: 15px;
    }
    
    .instruction-item span {
        font-size: 1rem;
    }
}

/* Loading Animation */
.math-adventure-game-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 20px 20px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.math-adventure-game-wrapper.loading::before {
    opacity: 1;
    animation: loadingProgress 2s infinite;
}

@keyframes loadingProgress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Accessibility Improvements */
.math-adventure-iframe:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.instruction-item:focus-within {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .math-adventure-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .math-adventure-header {
        background: none;
        color: #000;
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .math-adventure-game-wrapper {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .instruction-item {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Dark Mode Support (αν υποστηρίζεται από το theme) */
@media (prefers-color-scheme: dark) {
    .math-adventure-container {
        background: #1a1a1a;
    }
    
    .math-adventure-game-wrapper {
        background: #2d2d2d;
    }
    
    .instruction-item {
        background: #2d2d2d;
        color: #fff;
    }
    
    .instruction-item span {
        color: #fff;
    }
}