.redstone-basics {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.redstone-basics h2 {
    color: #c62828;
    margin-bottom: 10px;
}

.redstone-basics p {
    color: #5d4037;
    font-size: 1.1em;
    line-height: 1.5;
}

.redstone-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid #8B4513;
    background: #D2B48C;
    color: #4A4A4A;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: #DEB887;
    transform: translateY(-2px);
}

.category-btn.active {
    background: #8B4513;
    color: white;
}

.redstone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.redstone-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid #dc3545;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.redstone-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.3);
    border-color: #c82333;
}

.redstone-name {
    font-size: 1.4em;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 10px;
    text-align: center;
}

.redstone-type {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8em;
    position: absolute;
    top: 10px;
    right: 10px;
}

.redstone-type.basic { background: #28a745; }
.redstone-type.logic { background: #fd7e14; }
.redstone-type.circuits { background: #6f42c1; }
.redstone-type.machines { background: #20c997; }

.redstone-description {
    color: #5A5A5A;
    margin-bottom: 12px;
    line-height: 1.4;
}

.redstone-uses {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 8px;
    margin-top: 10px;
    font-size: 0.9em;
}

.redstone-uses strong {
    color: #856404;
}

.redstone-power {
    background: #ffebee;
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.9em;
    color: #c62828;
    text-align: center;
    margin-top: 8px;
}

.redstone-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.redstone-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 3% auto;
    padding: 30px;
    border: 3px solid #dc3545;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.redstone-title {
    color: #dc3545;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.redstone-info {
    color: #4A4A4A;
    line-height: 1.6;
}

.redstone-info h3 {
    color: #dc3545;
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #dc3545;
    padding-bottom: 5px;
}

.redstone-info h4 {
    color: #6c757d;
    margin-top: 15px;
    margin-bottom: 10px;
}

.redstone-info ul, .redstone-info ol {
    padding-left: 20px;
}

.redstone-info li {
    margin-bottom: 8px;
}

.power-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.power-info h4 {
    color: #856404;
    margin-bottom: 10px;
}

.recipe-info {
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.recipe-info h4 {
    color: #155724;
    margin-bottom: 10px;
}

.tips-box {
    background: #e7f3ff;
    border: 1px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.tips-box h4 {
    color: #004085;
    margin-bottom: 10px;
}

.circuit-diagram {
    background: #f8f9fa;
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    font-family: monospace;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .redstone-grid {
        grid-template-columns: 1fr;
    }

    .redstone-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .circuit-diagram {
        font-size: 0.9em;
        overflow-x: auto;
    }
}