body {
    overflow-y: auto;
    justify-content: flex-start;
    padding-top: 30px;
}

.header h1 {
    color: #2e8b57;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #2e8b57;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #1a6b3a;
    text-decoration: underline;
}

.tree-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px 40px 20px;
    z-index: 2;
    position: relative;
}

.tree-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.tree-image {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #f0f0f0;
    margin-bottom: 12px;
}

.tree-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 0.9rem;
}

.tree-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2e8b57;
    margin-bottom: 8px;
    text-align: center;
}

.tree-captions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #555;
    width: 100%;
}

.tree-captions span {
    display: block;
    width: 100%;
    text-align: center;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: #999;
    padding: 40px 0;
}

@media (max-width: 600px) {
    body {
        padding-top: 15px;
    }
    .header h1 {
        font-size: 1.8rem;
    }
    .tree-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 0 10px 30px 10px;
    }
    .tree-item {
        padding: 10px;
    }
    .tree-title {
        font-size: 1rem;
    }
    .tree-captions {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .tree-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
}
