/* Advanced Structure Encyclopedia Styles */

/* Header Styling */
.tool-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding: 3rem 1rem;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('/minecraft-assets/assets/minecraft/textures/block/stone_bricks.png');
    background-size: 64px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    overflow: hidden;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

.minecraft-title {
    font-family: 'Minecraft', sans-serif;
    color: #fff;
    text-shadow: 4px 4px 0 #000;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.subtitle {
    color: #ddd;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Filter Bar */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    color: #aaa;
    font-weight: bold;
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ddd;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: #3c8527; /* Minecraft Green */
    color: white;
    border-color: #5bb343;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Grid Layout */
.structures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* Structure Card (3D Tilt Effect) */
.structure-card {
    position: relative;
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.structure-card.hidden {
    display: none;
}

.card-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #444;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.structure-card:hover .card-content {
    border-color: #666;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

/* Icon Composition */
.structure-icon-container {
    width: 128px;
    height: 128px;
    position: relative;
    margin-bottom: 1.5rem;
    transform: translateZ(20px); /* 3D pop */
}

.icon-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
}

.icon-layer.base {
    transform: scale(0.9);
    filter: brightness(0.8);
}

.icon-layer.overlay {
    transform: scale(0.6) translateY(-10px);
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: scale(0.6) translateY(-10px); }
    50% { transform: scale(0.6) translateY(-15px); }
}

.structure-name {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
    transform: translateZ(10px);
}

/* Ratings */
.ratings {
    width: 100%;
    margin-bottom: 1.5rem;
    transform: translateZ(5px);
}

.rating-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.rating-icon {
    font-size: 1.2rem;
}

.rating-bar {
    flex-grow: 1;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: #00bcd4; /* Diamond Blue */
    box-shadow: 0 0 5px #00bcd4;
}

.rating-bar.danger .rating-fill {
    background: #f44336; /* Red */
    box-shadow: 0 0 5px #f44336;
}

/* Actions */
.card-actions {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    width: 100%;
    transform: translateZ(15px);
}

.small-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.details-btn {
    background: #555;
}

.find-btn {
    background: #3c8527;
}

.hidden-data {
    display: none;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #222;
    margin: 5% auto;
    padding: 0;
    border: 2px solid #666;
    width: 80%;
    max-width: 700px;
    color: #fff;
    animation: modalOpen 0.3s ease-out;
}

@keyframes modalOpen {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
}

.close-modal:hover {
    color: #fff;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #444;
    background: rgba(0,0,0,0.2);
}

.modal-body {
    padding: 2rem;
}

.modal-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-block h4 {
    color: #aaa;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.2rem;
}

.info-block p#modal-biomes {
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
    color: #ddd;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #555 #222;
}

.info-block p#modal-biomes::-webkit-scrollbar {
    width: 6px;
}
.info-block p#modal-biomes::-webkit-scrollbar-track {
    background: #222;
}
.info-block p#modal-biomes::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 3px;
}

.command-box {
    background: #111;
    padding: 0.8rem;
    border: 1px dashed #555;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.command-box:hover {
    background: #000;
    border-color: #888;
}

.command-box code {
    color: #55ff55;
    font-family: 'Consolas', monospace;
}

.copy-hint {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.3rem;
    text-align: right;
}

.modal-actions {
    margin-top: 2rem;
    text-align: center;
}

.large-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-info {
        grid-template-columns: 1fr;
    }
}

.structures-guide-section {
    margin-top: 2.5rem;
}

.structures-guide-header {
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.structures-guide-header h2 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

.structures-guide-header p {
    margin: 0;
    color: #ccc;
    line-height: 1.6;
}

.structures-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.guide-card {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-card h3 {
    margin: 0 0 1rem 0;
    color: #55ff55;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
}

.guide-steps {
    margin: 0;
    padding-left: 1.2rem;
    color: #ddd;
    line-height: 1.7;
}

.guide-features,
.guide-tips {
    margin: 0;
    padding-left: 1.2rem;
    color: #ddd;
    line-height: 1.7;
}

.feature-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    margin-right: 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(85, 255, 85, 0.35);
    background: rgba(85, 255, 85, 0.08);
    color: #b9ffb9;
    font-size: 0.85rem;
    vertical-align: baseline;
}

.guide-actions {
    margin-top: 1.25rem;
}

.structures-faq {
    padding: 1.5rem;
}

.structures-faq h3 {
    margin: 0 0 1rem 0;
    color: #fff;
    text-align: center;
    text-shadow: 2px 2px 0 #000;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.faq-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
}

.faq-item h4 {
    margin: 0 0 0.5rem 0;
    color: #ffcc66;
    font-size: 1rem;
}

.faq-item p {
    margin: 0;
    color: #ccc;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .structures-guide-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
}
